aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/login/login.component.html
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-09-09 22:16:51 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-09-09 22:16:51 +0200
commit4b2f33f3c6d109365090b08244d7f99ad4e69025 (patch)
tree700d3e8e14efc4172f754d75c041ec507100e897 /client/src/app/login/login.component.html
parentab32b0fc805b92c5a1d7ac5901cb1a38e94622ca (diff)
downloadPeerTube-4b2f33f3c6d109365090b08244d7f99ad4e69025.tar.gz
PeerTube-4b2f33f3c6d109365090b08244d7f99ad4e69025.tar.zst
PeerTube-4b2f33f3c6d109365090b08244d7f99ad4e69025.zip
Client: reactive forms
Diffstat (limited to 'client/src/app/login/login.component.html')
-rw-r--r--client/src/app/login/login.component.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html
index 636872942..94a405405 100644
--- a/client/src/app/login/login.component.html
+++ b/client/src/app/login/login.component.html
@@ -2,28 +2,28 @@
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)="login()" [formGroup]="loginForm"> 5<form role="form" (ngSubmit)="login()" [formGroup]="form">
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" 9 type="text" class="form-control" id="username" placeholder="Username" required
10 [(ngModel)]="username" 10 formControlName="username"
11 > 11 >
12 <div [hidden]="loginForm.controls.username.valid || loginForm.controls.username.pristine" class="alert alert-danger"> 12 <div *ngIf="formErrors.username" class="alert alert-danger">
13 Username is required 13 {{ formErrors.username }}
14 </div> 14 </div>
15 </div> 15 </div>
16 16
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" 20 type="password" class="form-control" name="password" id="password" placeholder="Password" required
21 [(ngModel)]="password" 21 formControlName="password"
22 > 22 >
23 <div [hidden]="loginForm.controls.password.valid || loginForm.controls.password.pristine" class="alert alert-danger"> 23 <div *ngIf="formErrors.password" class="alert alert-danger">
24 Password is required 24 {{ formErrors.password }}
25 </div> 25 </div>
26 </div> 26 </div>
27 27
28 <input type="submit" value="Login" class="btn btn-default" [disabled]="!loginForm.valid"> 28 <input type="submit" value="Login" class="btn btn-default" [disabled]="!form.valid">
29</form> 29</form>