]> dev.renevier.net Git - syj.git/blobdiff - public/js/account.js
highlight for input on errors
[syj.git] / public / js / account.js
index f6e204a29339816e71bc80565bcd17cea1052f51..ae4e3ecc213e5645bbddc22aac5a2b8379933864 100644 (file)
@@ -30,7 +30,7 @@ document.observe("dom:loaded", function() {
 
         if (!errorElements.length) {
             control = $("account_password");
-            if (control.check(function() {
+            if (!control.check(function() {
                 return this.value === $("account_password_confirm").value;
             }, SyjStrings.passwordNoMatchWarn)) {
                 errorElements.push(control);
@@ -50,7 +50,7 @@ document.observe("dom:loaded", function() {
          * if there are errors, cancel submission
          */
         if (errorElements.length) {
-            errorElements[0].focus();
+            errorElements[0].highlight('#F08080').focus();
             errorElements[0].select();
             evt.stop();
         }