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