Style “edit profile” page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 21 Oct 2010 18:03:49 +0000 (20:03 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 21 Oct 2010 18:03:49 +0000 (20:03 +0200)
src/main/resources/i18n/sone.en.properties
src/main/resources/static/css/sone.css
src/main/resources/templates/editProfile.html

index 8f26721..0f99640 100644 (file)
@@ -168,3 +168,6 @@ WebInterface.DefaultText.LoadSoneRequestURI=The Request Key of the Sone
 WebInterface.DefaultText.LoadSoneInsertURI=The Insert Key of the Sone
 WebInterface.DefaultText.Reply=Write a Reply…
 WebInterface.DefaultText.SoneRequestURI=Sone Request Key
+WebInterface.DefaultText.FirstName=First name
+WebInterface.DefaultText.MiddleName=Middle name(s)
+WebInterface.DefaultText.LastName=Last name
index da01622..b2981df 100644 (file)
@@ -324,7 +324,7 @@ textarea {
        border-top: none;
 }
 
-#sone #add-sone textarea, #sone #create-sone textarea, #sone #load-sone textarea {
+#sone #add-sone textarea, #sone #create-sone textarea, #sone #load-sone textarea, #sone #edit-profile textarea {
        height: 1.5em;
 }
 
index 1408e62..75d5da8 100644 (file)
@@ -1,5 +1,16 @@
 <%include include/head.html>
 
+       <script language="javascript">
+               $(document).ready(function() {
+                       registerInputTextareaSwap("#sone #edit-profile input[name=first-name]", "WebInterface.DefaultText.FirstName", true);
+                       registerInputTextareaSwap("#sone #edit-profile input[name=middle-name]", "WebInterface.DefaultText.MiddleName", true);
+                       registerInputTextareaSwap("#sone #edit-profile input[name=last-name]", "WebInterface.DefaultText.LastName", true);
+
+                       /* hide all the labels. */
+                       $("#sone #edit-profile label").hide();
+               });
+       </script>
+
        <h1><%= Page.EditProfile.Page.Title|l10n|html></h1>
 
        <div><%= Page.EditProfile.Page.Description|l10n|html></div>
@@ -9,7 +20,7 @@
                <div><%= Page.EditProfile.Page.Status.Changed|l10n|html></div>
        <%/if>
 
-       <form method="post">
+       <form id="edit-profile" method="post">
                <input type="hidden" name="formPassword" value="<% formPassword|html>" />
 
                <div>
                </div>
 
        </form>
-       
+
        <h1><%= Page.EditProfile.Keys.Title|l10n|html></h1>
-       
+
        <div><%= Page.EditProfile.Keys.Description.RequestKey|l10n|html></div>
        <div><%= Page.EditProfile.Keys.Description.InsertKey|l10n|html></div>
        <div><%= Page.EditProfile.Keys.Description.Summary|l10n|html></div>
-       
+
        <div>
                <label><%= Page.EditProfile.Label.RequestKey|l10n|html></label>
                <input type="text" class="key" readonly="readonly" value="<% currentSone.requestUri|html>" />
@@ -47,7 +58,7 @@
                <label><%= Page.EditProfile.Label.RequestKey|l10n|html></label>
                <input type="text" class="key" readonly="readonly" value="<% currentSone.insertUri|html>" />
        </div>
-       
+
        <h1><%= Page.EditProfile.Backup.Title|l10n|html></h1>
 
        <div><%= Page.EditProfile.Backup.Description|l10n|html></div>