Accept 'yellow' passwords, add a hard limit for submit activation.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 8 Jun 2008 16:16:16 +0000 (18:16 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 8 Jun 2008 16:16:16 +0000 (18:16 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
htdocs/javascript/xorg.js

index c013d19..e4f7b36 100644 (file)
@@ -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");