core/authentication/new-password.component.ts
OnInit
selector | c8y-new-password |
templateUrl | ./new-password.component.html |
viewProviders |
|
Properties |
Methods |
Outputs |
Accessors |
constructor(loginService: LoginService, cdRef: ChangeDetectorRef)
|
|||||||||
Parameters :
|
password |
Type : EventEmitter
|
Async loadPasswordStrengthSettings |
loadPasswordStrengthSettings()
|
Returns :
any
|
newPasswordChanged |
newPasswordChanged()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
toggleChangePassword |
toggleChangePassword()
|
Returns :
void
|
updateValidity | ||||||
updateValidity(requirementsFulfilled: boolean)
|
||||||
Parameters :
Returns :
void
|
changePassword |
Default value : false
|
minlength |
Type : number
|
model |
Type : any
|
Default value : {}
|
newPasswordModel |
Type : NgModel
|
passwordChecklistValidator |
Type : ValidatorFn
|
Default value : () => {...}
|
passwordEnforced |
Default value : false
|
requirementsFulfilled |
Type : boolean
|
_newPasswordModel | ||||||
set_newPasswordModel(ngModel: NgModel)
|
||||||
Parameters :
Returns :
void
|
<div class="form-group">
<button
class="btn btn-default"
type="button"
(click)="toggleChangePassword()"
>
<ng-container *ngIf="!changePassword">
{{ 'Change password' | translate }}
</ng-container>
<ng-container *ngIf="changePassword">
{{ 'Cancel password change' | translate }}
</ng-container>
</button>
</div>
<div
class="row content-flex-50"
*ngIf="changePassword"
>
<div class="col-6">
<c8y-form-group>
<label
for="newPassword"
translate
>
Password
</label>
<c8y-password-input
name="newPassword"
required
[id]="'newPassword'"
#newPassword="ngModel"
[(ngModel)]="model.newPassword"
(change)="newPasswordChanged()"
(input)="newPasswordConfirm.control.updateValueAndValidity()"
c8yDefaultValidation="password"
[autocomplete]="'new-password'"
></c8y-password-input>
</c8y-form-group>
<c8y-form-group>
<label
for="newConfirmPassword"
translate
>
Confirm password
</label>
<c8y-password-input
name="newPasswordConfirm"
required
[id]="'newConfirmPassword'"
#newPasswordConfirm="ngModel"
[(ngModel)]="model.newPasswordConfirm"
passwordConfirm="newPassword"
[autocomplete]="'new-password'"
></c8y-password-input>
</c8y-form-group>
</div>
<div class="col-6">
<c8y-password-check-list
[password]="model.newPassword"
[strengthEnforced]="passwordEnforced"
(onRequirementsFulfilled)="updateValidity($event)"
></c8y-password-check-list>
</div>
</div>