mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-26 12:24:18 +00:00
feat(preferences): Add password visible icons on password change (preferences + login page)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
this.$onInit = function() {
|
||||
this.preferences = Preferences;
|
||||
this.passwords = { newPassword: null, newPasswordConfirmation: null, oldPassword: null };
|
||||
this.passwordsDisplayed = { oldPassword: false, newPassword: false, newPasswordConfirmation: false};
|
||||
this.timeZonesList = $window.timeZonesList;
|
||||
this.timeZonesSearchText = '';
|
||||
this.addressesSearchText = '';
|
||||
@@ -745,6 +746,18 @@
|
||||
return null;
|
||||
};
|
||||
|
||||
this.changePasswordVisibility = function (fieldId, iconId) {
|
||||
this.passwordsDisplayed[fieldId] = !this.passwordsDisplayed[fieldId];
|
||||
var field = document.getElementById(fieldId);
|
||||
if (this.passwordsDisplayed[fieldId]) {
|
||||
field.type = "text";
|
||||
document.getElementById(iconId).innerHTML = 'visibility_off';
|
||||
} else {
|
||||
field.type = "password";
|
||||
document.getElementById(iconId).innerHTML = 'visibility';
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
angular
|
||||
|
||||
Reference in New Issue
Block a user