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