aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/admin/users/user-add/user-add.component.html
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/admin/users/user-add/user-add.component.html')
-rw-r--r--client/src/app/admin/users/user-add/user-add.component.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/client/src/app/admin/users/user-add/user-add.component.html b/client/src/app/admin/users/user-add/user-add.component.html
index aa102358a..09219893b 100644
--- a/client/src/app/admin/users/user-add/user-add.component.html
+++ b/client/src/app/admin/users/user-add/user-add.component.html
@@ -2,14 +2,14 @@
2 2
3<div *ngIf="error" class="alert alert-danger">{{ error }}</div> 3<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
4 4
5<form role="form" (ngSubmit)="addUser(username.value, password.value)" #addUserForm="ngForm"> 5<form role="form" (ngSubmit)="addUser()" [formGroup]="userAddForm">
6 <div class="form-group"> 6 <div class="form-group">
7 <label for="username">Username</label> 7 <label for="username">Username</label>
8 <input 8 <input
9 type="text" class="form-control" name="username" id="username" placeholder="Username" required 9 type="text" class="form-control" name="username" id="username" placeholder="Username"
10 ngControl="username" #username="ngForm" 10 [(ngModel)]="username"
11 > 11 >
12 <div [hidden]="username.valid || username.pristine" class="alert alert-danger"> 12 <div [hidden]="userAddForm.controls.username.valid || userAddForm.controls.username.pristine" class="alert alert-danger">
13 Username is required with a length >= 3 and <= 20 13 Username is required with a length >= 3 and <= 20
14 </div> 14 </div>
15 </div> 15 </div>
@@ -17,13 +17,13 @@
17 <div class="form-group"> 17 <div class="form-group">
18 <label for="password">Password</label> 18 <label for="password">Password</label>
19 <input 19 <input
20 type="password" class="form-control" name="password" id="password" placeholder="Password" required 20 type="password" class="form-control" name="password" id="password" placeholder="Password"
21 ngControl="password" #password="ngForm" 21 [(ngModel)]="password"
22 > 22 >
23 <div [hidden]="password.valid || password.pristine" class="alert alert-danger"> 23 <div [hidden]="userAddForm.controls.password.valid || userAddForm.controls.password.pristine" class="alert alert-danger">
24 Password is required with a length >= 6 24 Password is required with a length >= 6
25 </div> 25 </div>
26 </div> 26 </div>
27 27
28 <input type="submit" value="Add user" class="btn btn-default" [disabled]="!addUserForm.form.valid"> 28 <input type="submit" value="Add user" class="btn btn-default" [disabled]="!userAddForm.valid">
29</form> 29</form>