<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <form appFormSubmit (ngSubmit)="changePassword()" [formGroup]="changePasswordForm">
    <app-form-errors #formErrors [formGroup]="changePasswordForm"></app-form-errors>
      <div layoutDirection="row">
        <mat-form-field appFlex="100">
          <mat-label i18n>Password</mat-label>
          <input matInput placeholder="Password" i18n-placeholder [attr.type]="showPassword ? 'text': 'password'"
                 formControlName="password" required>
          <mat-error>{{backendErrors['password'] || fieldRequiredTxt}}</mat-error>
          <a mat-icon-button matSuffix
             (mousedown)="showPassword = true"
             (mouseup)="showPassword = false"
             [matTooltip]="holdButtonTxt">
            <mat-icon>
              visibility
            </mat-icon>
          </a>
        </mat-form-field>
      </div>
    </form>
  </ng-template>
</app-common-dialog>
