Updates formatting of AX education...
[platal.git] / htdocs / javascript / password.js
index 4e8b1b9..af708a8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -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;