core/login/recover-password.component.ts
selector | c8y-recover-password |
templateUrl | ./recover-password.component.html |
Properties |
|
Methods |
|
Outputs |
constructor(users: UserService, loginService: LoginService)
|
|||||||||
Parameters :
|
onChangeView |
Type : EventEmitter
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Async resetPassword |
resetPassword()
|
Returns :
any
|
isLoading |
Default value : false
|
LOGIN_VIEWS |
Default value : LoginViews
|
Public loginService |
Type : LoginService
|
model |
Type : object
|
Default value : {
email: '',
tenantId: ''
}
|
<form #resetForm="ngForm" class="loginForm" (ngSubmit)="resetPassword()" novalidate>
<div class="legend form-block center" translate>Forgot password?</div>
<c8y-form-group class="tenantField" id="tenantField" *ngIf="loginService.showTenant()">
<label translate>Tenant ID</label>
<input
[(ngModel)]="model.tenantId"
#tenantId="ngModel"
type="text"
name="tenantId"
autocapitalize="off"
autocorrect="off"
class="form-control"
placeholder="{{ 'Tenant ID' | translate }}"
required
/>
</c8y-form-group>
<c8y-form-group>
<label translate>Email address</label>
<input
[(ngModel)]="model.email"
#email="ngModel"
type="text"
name="email"
autocapitalize="off"
autocorrect="off"
class="form-control"
placeholder="{{ 'Email address' | translate }}"
email
required
/>
</c8y-form-group>
<button
title="{{ 'Reset password' | translate }}"
[disabled]="!resetForm.form.valid || isLoading"
type="submit"
class="btn btn-primary btn-lg btn-block form-group"
translate
>
Reset password
</button>
<div class="text-center m-t-8">
<p>
<button
title="{{ 'Login' | translate }}"
class="btn btn-link btn-sm"
(click)="onChangeView.emit({ view: LOGIN_VIEWS.Credentials })"
translate
>
Login
</button>
</p>
</div>
</form>