Only uses autoload to require validation classes.
[platal.git] / htdocs / javascript / password.js
index 4e8b1b9..578e345 100644 (file)
@@ -20,6 +20,7 @@
 
 function hashResponse(password1, password2, hasConfirmation) {
     pw1 = $('[name=' + password1 + ']').val();
+
     if (hasConfirmation) {
         pw2 = $('[name=' + password2 + ']').val();
         if (pw1 != pw2) {
@@ -27,7 +28,10 @@ function hashResponse(password1, password2, hasConfirmation) {
             return false;
         }
         $('[name=' + password2 + ']').val('');
+    } else if (pw1 == '********') {
+        return true;
     }
+
     if (pw1.length < 6) {
         alert("\nErreur : le nouveau mot de passe doit faire au moins 6 caractères !");
         return false;