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

    <div class="input-group mb-3">
      <div class="input-group-prepend">
        <div class="input-group-text">
          <input type="checkbox" aria-label="Show password" (change)="togglePasswordVisibility()">
        </div>
      </div>
      <input id="passwordField" #passwordField
      [attr.type]="showPassword ? 'text' : 'password'" id="password"
        formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
      >
      <div class="input-group-append">
        <button class="btn btn-sm btn-outline-secondary" (click)="generatePassword()  " 
                type="button">Generate</button>
      </div>
    </div>
    <div *ngIf="formErrors.password" class="form-error">
      {{ formErrors.password }}
    </div>
  </div>

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