Change the text of the submit button when the password is not valid.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 6 Oct 2008 15:18:56 +0000 (17:18 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 6 Oct 2008 15:18:56 +0000 (17:18 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Conflicts:

htdocs/javascript/xorg.js
templates/googleapps/index.tpl
templates/platal/acces_smtp.tpl

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
plugins/compiler.checkpasswd.php

index 2ad19ff..b03cc91 100644 (file)
@@ -31,15 +31,18 @@ function smarty_compiler_checkpasswd($tag_attrs, &$compiler)
     if (!isset($submit)) {
       $submit = "'submitn'";
     }
+    if (!isset($text)) {
+      $text = "'Changer'";
+    }
 
     return '?><script type="text/javascript" src="javascript/jquery.js" ></script>
               <script type="text/javascript" src="javascript/jquery.color.js" ></script>
               <script type="text/javascript">//<![CDATA[
                 var passwordprompt_name = '.  $prompt . ';
                 var passwordprompt_submit = ' . $submit . ';
-                $(":input[@name=' . $prompt . ']").keyup(function(event) { checkPassword(event.target); });
+                $(":input[@name=' . $prompt . ']").keyup(function(event) { checkPassword(event.target, ' . $text . '); });
                 $(document).ready(function() {
-                  checkPassword($(":input[@name=' . $prompt . ']").get(0));
+                  checkPassword($(":input[@name=' . $prompt . ']").get(0), ' . $text . ');
                 });
               //]]></script>
               <div>