aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/login/login.component.html
blob: a69acfcb1ae3b85786b5cd465634ef1e6f17b0c2 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                            
 
                                                                 
 

                                                            
                                                             
            
                                                                                  
                                                                                        
       
                                                          
                                 
            
          
 



                                                                                     
                                                                                        
       
                                                          
                                 
            
          
 

                                                                
      
<div class="margin-content">
  <div class="title-page title-page-single">
    Login
  </div>

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

  <form role="form" (ngSubmit)="login()" [formGroup]="form">
    <div class="form-group">
      <label for="username">Username or email address</label>
      <input
        type="text" id="username" placeholder="Username or email address" required
        formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
      >
      <div *ngIf="formErrors.username" class="form-error">
        {{ formErrors.username }}
      </div>
    </div>

    <div class="form-group">
      <label for="password">Password</label>
      <input
        type="password" name="password" id="password" placeholder="Password" required
        formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
      >
      <div *ngIf="formErrors.password" class="form-error">
        {{ formErrors.password }}
      </div>
    </div>

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