From: Florent Bruneau Date: Sat, 3 May 2008 21:51:14 +0000 (+0200) Subject: More configuration. X-Git-Tag: core/1.0.0~217 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5a5d0431dc41c6eb1adf10c134331d8f44c91277;p=platal.git More configuration. * can change the submit button name * auto-disable the submit button at startup Signed-off-by: Florent Bruneau --- diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 7cb2fe3..84ace48 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -326,9 +326,9 @@ function checkPassword(box) { ok = (prop >= 60); $("#passwords_measure").width(prop + "%").css("background-color", ok ? "green" : "red"); if (ok) { - $(":submit").removeAttr("disabled"); + $(":submit[@name='" + passwordprompt_submit + "']").removeAttr("disabled"); } else { - $(":submit").attr("disabled", "disabled"); + $(":submit[@name='" + passwordprompt_submit + "']").attr("disabled", "disabled"); } } diff --git a/plugins/compiler.checkpasswd.php b/plugins/compiler.checkpasswd.php index dbfbc71..1f90d09 100644 --- a/plugins/compiler.checkpasswd.php +++ b/plugins/compiler.checkpasswd.php @@ -26,13 +26,21 @@ function smarty_compiler_checkpasswd($tag_attrs, &$compiler) if (!isset($width)) { $width = '250px'; } - if (!isset($id)) { - $id = "newpassword"; + if (!isset($prompt)) { + $prompt = "'nouveau'"; + } + if (!isset($submit)) { + $submit = "'submitn'"; } return '?>