core/authentication/password-confirm-modal.component.ts
selector | c8y-password-confirm-modal |
templateUrl | ./password-confirm-modal.component.html |
Properties |
Methods |
Outputs |
constructor(user: UserService, ui: AppStateService, client: FetchClient, alert: AlertService, loginService: LoginService)
|
||||||||||||||||||
Parameters :
|
passwordConfirmedEmitter |
Type : EventEmitter
|
cancel |
cancel()
|
Returns :
void
|
createNewClient | |||||||||
createNewClient(strategy: IAuthentication, baseUrl: string)
|
|||||||||
Parameters :
Returns :
any
|
Async passwordConfirm |
passwordConfirm()
|
Returns :
any
|
loading |
Default value : false
|
password |
Type : string
|
Public ui |
Type : AppStateService
|
Public user |
Type : UserService
|
<c8y-modal [customFooter]="true" [title]="'Confirm your current password' | translate" #modal>
<form #confirmForm="ngForm" (ngSubmit)="confirmForm.form.valid && passwordConfirm()">
<div class="d-block p-24 p-b-0">
<c8y-form-group [hasWarning]="true">
<label translate for="currentPassword">Enter your password</label>
<input
id="currentPassword"
[(ngModel)]="password"
type="password"
name="password"
class="form-control"
placeholder="{{ 'Enter your password' | translate }}"
required
/>
<c8y-messages>
<c8y-message translate>
Enter the password of the user that you are currently logged in with.
</c8y-message>
</c8y-messages>
</c8y-form-group>
</div>
<div class="modal-footer separator-top bg-level-0 sticky-bottom">
<button
title="{{ 'Cancel' | translate }}"
class="btn btn-default"
type="button"
(click)="cancel()"
>
{{ 'Cancel' | translate }}
</button>
<button
title="{{ 'Confirm' | translate }}"
class="btn btn-primary"
type="submit"
[disabled]="!confirmForm.form.valid || loading"
>
{{ 'Confirm' | translate }}
</button>
</div>
</form>
</c8y-modal>