diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 09:30:29 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 10:37:27 +0100 |
commit | b426edd4854adc6e65844d8c54b8998e792b5778 (patch) | |
tree | b9ef4da0cdb2ab14c0aa1d67a883303f3ed0de14 /client/src/app/+admin/users/user-edit/user-password.component.html | |
parent | 67b1d3fed765278bdc876cce393ef56d56942df0 (diff) | |
download | PeerTube-b426edd4854adc6e65844d8c54b8998e792b5778.tar.gz PeerTube-b426edd4854adc6e65844d8c54b8998e792b5778.tar.zst PeerTube-b426edd4854adc6e65844d8c54b8998e792b5778.zip |
Cleanup reset user password by admin
And add some tests
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-password.component.html')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-password.component.html | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.html b/client/src/app/+admin/users/user-edit/user-password.component.html index 822e4688e..a1e1f6216 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.html +++ b/client/src/app/+admin/users/user-edit/user-password.component.html | |||
@@ -1,19 +1,15 @@ | |||
1 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | 1 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> |
2 | <div class="form-group"> | 2 | <div class="form-group"> |
3 | 3 | ||
4 | <div class="input-group mb-3"> | 4 | <div class="input-group"> |
5 | <div class="input-group-prepend"> | 5 | <input id="password" [attr.type]="showPassword ? 'text' : 'password'" |
6 | <div class="input-group-text"> | ||
7 | <input type="checkbox" aria-label="Show password" (change)="togglePasswordVisibility()"> | ||
8 | </div> | ||
9 | </div> | ||
10 | <input id="passwordField" #passwordField | ||
11 | [attr.type]="showPassword ? 'text' : 'password'" id="password" | ||
12 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" | 6 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" |
13 | > | 7 | > |
14 | <div class="input-group-append"> | 8 | <div class="input-group-append"> |
15 | <button class="btn btn-sm btn-outline-secondary" (click)="generatePassword() " | 9 | <button class="btn btn-sm btn-outline-secondary" (click)="togglePasswordVisibility()" type="button"> |
16 | type="button">Generate</button> | 10 | <ng-container *ngIf="!showPassword" i18n>Show</ng-container> |
11 | <ng-container *ngIf="!!showPassword" i18n>Hide</ng-container> | ||
12 | </button> | ||
17 | </div> | 13 | </div> |
18 | </div> | 14 | </div> |
19 | <div *ngIf="formErrors.password" class="form-error"> | 15 | <div *ngIf="formErrors.password" class="form-error"> |