From b19839fde1d6af2c491bc6289bd15fd4c49fd9d7 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 8 Jun 2008 18:16:16 +0200 Subject: [PATCH] Accept 'yellow' passwords, add a hard limit for submit activation. Signed-off-by: Florent Bruneau --- htdocs/javascript/xorg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); -- 2.1.4