Commits

Matthew Marshall committed 6fb5534

Fixed bug in javascript on the front page.

  • Participants
  • Parent commits 53f9e35

Comments (0)

Files changed (1)

File templates/frontpage.html

                 </p>
             </div>
     {% endfor %}
-    <span class="more-options-placeholder"></span>
     {% if user.is_authenticated %}
         <input type='submit' name='createrepo' value='Create repository for {{user.username}}' />
     {% endif %}
 $(document).ready(function (){
     $('fieldset').each(function(){
         if ($(this).children('.form-row:not(.required, .errors)').hide().length) {
-            var elem = $('<a href="#" class="showmore" style="display:block;margin-bottom:12px;>Show more options</'+'a>').click(function(){
+            var elem = $('<a href="#" class="showmore" style="display:block;margin-bottom:12px;">Show more options</'+'a>').click(function(){
                 $(this).hide();
                 $(this).siblings('.form-row:hidden').show();
                 return false;
             });
-            if ($(this).children('.more-options-placeholder')){
-                $(this).children('.more-options-placeholder').replaceWith(elem);
+            if ($(this).children("input[@type='submit']")){
+                $(this).children("input[@type='submit']").before(elem);
             } else {
                 $(this).append(elem);
             }