diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-04 13:31:23 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-04 13:31:23 +0200 |
commit | 192ea60b82806669fd633888fe9641f24bd5abd3 (patch) | |
tree | 7f1ad827d69b747e4acdd4c44f0265fa3df97b66 /client/src/app/login/login.component.html | |
parent | 7f82b8ae377214dd9b3f13a76a5e5f4e963e9425 (diff) | |
download | PeerTube-192ea60b82806669fd633888fe9641f24bd5abd3.tar.gz PeerTube-192ea60b82806669fd633888fe9641f24bd5abd3.tar.zst PeerTube-192ea60b82806669fd633888fe9641f24bd5abd3.zip |
Improve the login form
Diffstat (limited to 'client/src/app/login/login.component.html')
-rw-r--r-- | client/src/app/login/login.component.html | 24 |
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> |