add user status
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<h2>{{'password.change' | i18n}}</h2>
|
||||
<mat-hint *ngIf="success">
|
||||
{{'password.changed' | i18n}}
|
||||
</mat-hint>
|
||||
<mat-form-field>
|
||||
<input matInput type="password" placeholder="{{'password.current' | i18n}}"
|
||||
formControlName="oldPassword" [(ngModel)]="model.old">
|
||||
<mat-error *ngFor="let error of passwordForm.get('oldPassword').errors | keyvalue">
|
||||
{{error.key}}
|
||||
</mat-error>
|
||||
<mat-hint *ngIf="success">
|
||||
{{'password.changed' | i18n}}
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="password" placeholder="{{'password' | i18n}}" formControlName="password"
|
||||
@@ -36,13 +36,41 @@
|
||||
</mat-card>
|
||||
</form>
|
||||
|
||||
<form [formGroup]="statusForm" (ngSubmit)="changeStatus()" #statusFormDirective="ngForm">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<h2>{{'security.status' | i18n}}</h2>
|
||||
<p> {{'security.status.hint' | i18n}}</p>
|
||||
<mat-form-field>
|
||||
<mat-select [(ngModel)]="model.status" formControlName="status" placeholder="{{'security.status' | i18n}}">
|
||||
<mat-option *ngFor="let status of statuses" [value]="status">
|
||||
{{'security.status.' + status | i18n}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-hint *ngIf="successStatus">
|
||||
{{'security.status.success' | i18n}}
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-label>{{'security.status.' + model.status + '.hint' | i18n}}</mat-label>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<mat-progress-bar *ngIf="working" mode="indeterminate"></mat-progress-bar>
|
||||
<button *ngIf="!working" mat-raised-button color="primary" [disabled]="statusForm.invalid">
|
||||
{{'security.status.change' | i18n}}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</form>
|
||||
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<h2>{{'security.2fa' | i18n}}</h2>
|
||||
<p>{{'security.2fa.info' | i18n}}</p>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button *ngIf="!totp" (click)="createTotp()" mat-raised-button color="accent">{{'security.2fa.totp.create' | i18n}}</button>
|
||||
<button *ngIf="totp" (click)="removeTotp()" mat-raised-button color="warn">{{'security.2fa.totp.remove' | i18n}}</button>
|
||||
<button *ngIf="!totp" (click)="createTotp()" mat-raised-button color="accent">{{'security.2fa.totp.create' |
|
||||
i18n}}</button>
|
||||
<button *ngIf="totp" (click)="removeTotp()" mat-raised-button color="warn">{{'security.2fa.totp.remove' |
|
||||
i18n}}</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
Reference in New Issue
Block a user