mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#151 Fixed css style and show password
This commit is contained in:
@@ -40,6 +40,8 @@ export class AlfrescoLoginComponent {
|
||||
|
||||
__baseUrl = __moduleName.replace('/alfresco-login.component.js', '');
|
||||
|
||||
isPasswordShow: boolean = false;
|
||||
|
||||
@Output()
|
||||
onSuccess = new EventEmitter();
|
||||
@Output()
|
||||
@@ -71,7 +73,7 @@ export class AlfrescoLoginComponent {
|
||||
'password': ''
|
||||
};
|
||||
|
||||
this.form = this._fb.group({
|
||||
this.form = this._fb.group({
|
||||
username: ['', Validators.compose([Validators.required, Validators.minLength(4)])],
|
||||
password: ['', Validators.required]
|
||||
});
|
||||
@@ -149,6 +151,18 @@ export class AlfrescoLoginComponent {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display and hide the password value.
|
||||
*/
|
||||
toggleShowPassword() {
|
||||
this.isPasswordShow = !this.isPasswordShow;
|
||||
if (this.isPasswordShow) {
|
||||
(<HTMLInputElement>document.getElementById("password")).type = 'text'
|
||||
} else {
|
||||
(<HTMLInputElement>document.getElementById("password")).type = 'password';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The method return if a field is valid or not
|
||||
* @param field
|
||||
|
Reference in New Issue
Block a user