aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/login/login.component.html
blob: 5848fcba30d55f18f8e6f83867002af296c52768 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<h3>Login</h3>


<div *ngIf="error" class="alert alert-danger">{{ error }}</div>

<form role="form" (ngSubmit)="login(username.value, password.value)" #loginForm="ngForm">
  <div class="form-group">
    <label for="username">Username</label>
    <input
      type="text" class="form-control" name="username" id="username" placeholder="Username" required
      ngControl="username" #username="ngForm"
    >
    <div [hidden]="username.valid || username.pristine" class="alert alert-danger">
      Username is required
    </div>
  </div>

  <div class="form-group">
    <label for="password">Password</label>
    <input
      type="password" class="form-control" name="password" id="password" placeholder="Password" required
      ngControl="password" #password="ngForm"
    >
    <div [hidden]="password.valid || password.pristine" class="alert alert-danger">
      Password is required
    </div>
  </div>

  <input type="submit" value="Login" class="btn btn-default" [disabled]="!loginForm.form.valid">
</form>