mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
feat(login): Add button to discover password
This commit is contained in:
@@ -50,7 +50,8 @@
|
||||
<md-input-container class="md-block">
|
||||
<label><var:string label:value="Password"/></label>
|
||||
<md-icon>email</md-icon>
|
||||
<input type="password" ng-model="app.creds.password" ng-required="true"/>
|
||||
<input id="passwordField" type="password" ng-model="app.creds.password" ng-required="true"/>
|
||||
<md-icon id="password-visibility-icon" ng-click="app.changePasswordVisibility()">visibility</md-icon>
|
||||
</md-input-container>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -29,7 +29,7 @@
|
||||
this.verificationCodePattern = '\\d{6}';
|
||||
|
||||
// Password policy - change expired password
|
||||
this.passwords = { newPassword: null, newPasswordConfirmation: null, oldPassword: null };
|
||||
this.passwords = { newPassword: null, newPasswordConfirmation: null, oldPassword: null, visible: false };
|
||||
|
||||
// Password recovery
|
||||
this.passwordRecovery = {
|
||||
@@ -317,6 +317,17 @@
|
||||
}
|
||||
};
|
||||
|
||||
this.changePasswordVisibility = function () {
|
||||
this.passwords.visible = !this.passwords.visible;
|
||||
var field = document.getElementById("passwordField");
|
||||
if (this.passwords.visible) {
|
||||
field.type = "text";
|
||||
document.getElementById("password-visibility-icon").innerHTML = 'visibility_off';
|
||||
} else {
|
||||
field.type = "password";
|
||||
document.getElementById("password-visibility-icon").innerHTML = 'visibility';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
angular
|
||||
|
||||
Reference in New Issue
Block a user