Restructure HTML to let the enter key work better.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 14 Jan 2011 11:41:10 +0000 (12:41 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 14 Jan 2011 11:41:10 +0000 (12:41 +0100)
src/main/resources/templates/editProfile.html

index a58ace4..35ef68d 100644 (file)
                                registerInputTextareaSwap("#sone #edit-profile input[name=birth-year]", birthYearDefaultText, "birth-year", true, true);
                        });
                        getTranslation("WebInterface.DefaultText.FieldName", function(fieldNameDefaultText) {
-                               registerInputTextareaSwap("#sone #edit-profile input[name=field-name]", fieldNameDefaultText, "field-name", true, true);
+                               registerInputTextareaSwap("#sone #add-profile-field input[name=field-name]", fieldNameDefaultText, "field-name", true, true);
                        });
 
                        /* hide all the labels. */
-                       $("#sone #edit-profile label").hide();
+                       $("#sone #edit-profile label, #sone #add-profile-field label").hide();
                });
        </script>
 
                        </div>
                <%/foreach>
 
+               <div>
+                       <button type="submit" name="save-profile" value="true"><%= Page.EditProfile.Button.Save|l10n|html></button>
+               </div>
+
+       </form>
+
+       <form id="add-profile-field" method="post">
+               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+
                <a name="profile-fields"></a>
                <h2><%= Page.EditProfile.Fields.AddField.Title|l10n|html></h2>
 
                        <button type="submit" name="add-field" value="true"><%= Page.EditProfile.Fields.AddField.Button.AddField|l10n|html></button>
                </div>
 
-               <div>
-                       <button type="submit" name="save-profile" value="true"><%= Page.EditProfile.Button.Save|l10n|html></button>
-               </div>
-
        </form>
 
 <%include include/tail.html>