aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/login/login.component.html
blob: bcea0a27a99415d5d0b67c3283af8ec9e5cfa3f4 (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
31
32
33
34
<div class="row">
  <div class="content-padding">

    <h3>Login</h3>

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

    <form role="form" (ngSubmit)="login()" [formGroup]="form">
      <div class="form-group">
        <label for="username">Username</label>
        <input
          type="text" class="form-control" id="username" placeholder="Username" required
          formControlName="username"
        >
        <div *ngIf="formErrors.username" class="alert alert-danger">
          {{ formErrors.username }}
        </div>
      </div>

      <div class="form-group">
        <label for="password">Password</label>
        <input
          type="password" class="form-control" name="password" id="password" placeholder="Password" required
          formControlName="password"
        >
        <div *ngIf="formErrors.password" class="alert alert-danger">
          {{ formErrors.password }}
        </div>
      </div>

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