aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/users/user-edit/user-password.component.html
blob: 1238d18398cdeac02a61e2b6dc450226ab0f8f3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
  <div class="form-group">

    <div class="input-group">
      <input id="password" [attr.type]="showPassword ? 'text' : 'password'" class="form-control"
        formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
      >
      <div class="input-group-append">
        <button class="btn btn-sm btn-outline-secondary" (click)="togglePasswordVisibility()" type="button">
          <ng-container *ngIf="!showPassword" i18n>Show</ng-container>
          <ng-container *ngIf="!!showPassword" i18n>Hide</ng-container>
        </button>
      </div>
    </div>
    <div *ngIf="formErrors.password" class="form-error">
      {{ formErrors.password }}
    </div>
  </div>

  <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
</form>