mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 23:37:15 +00:00
fix(preferences(js)): show error when passwords don't match
This commit is contained in:
1 parent
2300fe8aab
commit
0e7ce3129c
3 files changed
+13
-4
No files matched your search
@@ -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 &&
|
||||
|
||||
Reference in new issue
Block a user