Fix default texts of input fields.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 12 Nov 2010 13:00:15 +0000 (14:00 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 12 Nov 2010 13:00:15 +0000 (14:00 +0100)
src/main/resources/templates/editProfile.html
src/main/resources/templates/options.html

index edc3b38..d1d5943 100644 (file)
@@ -2,12 +2,24 @@
 
        <script language="javascript">
                $(document).ready(function() {
-                       registerInputTextareaSwap("#sone #edit-profile input[name=first-name]", "WebInterface.DefaultText.FirstName", "first-name", true, true);
-                       registerInputTextareaSwap("#sone #edit-profile input[name=middle-name]", "WebInterface.DefaultText.MiddleName", "middle-name", true, true);
-                       registerInputTextareaSwap("#sone #edit-profile input[name=last-name]", "WebInterface.DefaultText.LastName", "last-name", true, true);
-                       registerInputTextareaSwap("#sone #edit-profile input[name=birth-day]", "WebInterface.DefaultText.BirthDay", "birth-day", true, true);
-                       registerInputTextareaSwap("#sone #edit-profile input[name=birth-month]", "WebInterface.DefaultText.BirthMonth", "birth-month", true, true);
-                       registerInputTextareaSwap("#sone #edit-profile input[name=birth-year]", "WebInterface.DefaultText.BirthYear", "birth-year", true, true);
+                       getTranslation("WebInterface.DefaultText.FirstName", function(firstNameDefaultText) {
+                               registerInputTextareaSwap("#sone #edit-profile input[name=first-name]", firstNameDefaultText, "first-name", true, true);
+                       });
+                       getTranslation("WebInterface.DefaultText.MiddleName", function(middleNameDefaultText) {
+                               registerInputTextareaSwap("#sone #edit-profile input[name=middle-name]", middleNameDefaultText, "middle-name", true, true);
+                       });
+                       getTranslation("WebInterface.DefaultText.LastName", function(lastNameDefaultText) {
+                               registerInputTextareaSwap("#sone #edit-profile input[name=last-name]", lastNameDefaultText, "last-name", true, true);
+                       });
+                       getTranslation("WebInterface.DefaultText.BirthDay", function(birthDayDefaultText) {
+                               registerInputTextareaSwap("#sone #edit-profile input[name=birth-day]", birthDayDefaultText, "birth-day", true, true);
+                       });
+                       getTranslation("WebInterface.DefaultText.BirthMonth", function(birthMonthDefaultText) {
+                               registerInputTextareaSwap("#sone #edit-profile input[name=birth-month]", birthMonthDefaultText, "birth-month", true, true);
+                       });
+                       getTranslation("WebInterface.DefaultText.BirthYear", function(birthYearDefaultText) {
+                               registerInputTextareaSwap("#sone #edit-profile input[name=birth-year]", birthYearDefaultText, "birth-year", true, true);
+                       });
 
                        /* hide all the labels. */
                        $("#sone #edit-profile label").hide();
index 45a540c..8221a44 100644 (file)
@@ -2,7 +2,9 @@
 
        <script language="javascript">
                $(document).ready(function() {
-                       registerInputTextareaSwap("#sone #options input[name=insertion-delay]", "WebInterface.DefaultText.Option.InsertionDelay", "insertion-delay", true, true);
+                       getTranslation("WebInterface.DefaultText.Option.InsertionDelay", function(insertionDelayDefaultText) {
+                               registerInputTextareaSwap("#sone #options input[name=insertion-delay]", insertionDelayDefaultText, "insertion-delay", true, true);
+                       });
                });
        </script>