From: Florent Bruneau Date: Sun, 8 Jun 2008 16:16:16 +0000 (+0200) Subject: Accept 'yellow' passwords, add a hard limit for submit activation. X-Git-Tag: core/1.0.0~118 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=b19839fde1d6af2c491bc6289bd15fd4c49fd9d7;p=platal.git Accept 'yellow' passwords, add a hard limit for submit activation. Signed-off-by: Florent Bruneau --- diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index c013d19..e4f7b36 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -334,7 +334,7 @@ function checkPassword(box) { } else if (prop >= 40) { color = "#ff4"; bgcolor = "#750"; - ok = false; + ok = true; } else { color = "#f20"; bgcolor = "#700"; @@ -348,7 +348,7 @@ function checkPassword(box) { .parent().stop() .animate({ backgroundColor: bgcolor }, 750); var submitButton = $(":submit[@name='" + passwordprompt_submit + "']"); - if (ok) { + if (ok && pass.length >= 6) { submitButton.removeAttr("disabled"); } else { submitButton.attr("disabled", "disabled");