diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index 248f39dd3..d113db5e3 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -242,6 +242,7 @@ "New password" = "New password"; "Confirmation" = "Confirmation"; "Change" = "Change"; +"Passwords don't match" = "Passwords don't match"; /* Event+task classifications */ "Default events classification" = "Default events classification"; diff --git a/UI/Templates/PreferencesUI/UIxPreferences.wox b/UI/Templates/PreferencesUI/UIxPreferences.wox index 0ddc8795b..c8ff7826c 100644 --- a/UI/Templates/PreferencesUI/UIxPreferences.wox +++ b/UI/Templates/PreferencesUI/UIxPreferences.wox @@ -272,15 +272,17 @@ - - + +
+
+
- +
diff --git a/UI/WebServerResources/js/Preferences/PreferencesController.js b/UI/WebServerResources/js/Preferences/PreferencesController.js index 45444ce9e..c322c4f5d 100644 --- a/UI/WebServerResources/js/Preferences/PreferencesController.js +++ b/UI/WebServerResources/js/Preferences/PreferencesController.js @@ -462,7 +462,13 @@ return $q.reject('Invalid form'); }; - this.canChangePassword = function() { + this.canChangePassword = function(form) { + if (this.passwords.newPasswordConfirmation && this.passwords.newPasswordConfirmation.length && + this.passwords.newPassword != this.passwords.newPasswordConfirmation) { + form.newPasswordConfirmation.$setValidity('newPasswordMismatch', false); + } else { + form.newPasswordConfirmation.$setValidity('newPasswordMismatch', true); + } if (this.passwords.newPassword && this.passwords.newPassword.length > 0 && this.passwords.newPasswordConfirmation && this.passwords.newPasswordConfirmation.length && this.passwords.newPassword == this.passwords.newPasswordConfirmation &&