source: trip-planner-front/src/app/homepage/login/login.component.html@ 76712b2

Last change on this file since 76712b2 was b738035, checked in by Ema <ema_spirova@…>, 3 years ago

signup/login server errors on front and remove location from planner

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[b738035]1<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
2 integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
3
4
[84d0fbb]5
[b738035]6<div class="readersack">
7 <div class="container">
8 <div class="row">
9 <div class="col-md-6 offset-md-3">
10 <form [formGroup]="form" #myform="ngForm" (ngSubmit)="onFormLogIn(loginRequest)">
11 <div class="form-group">
12
13 <label>Username (email)</label>
14 <input formControlName="username" id="username" type="text" class="form-control"
15 [(ngModel)]="loginRequest.username"
16 [ngClass]="{ 'is-invalid': myform.submitted && (form.get('username')?.errors?.['required']
17 || form.get('username')?.errors?.['validateUser'])}" />
18 <div *ngIf="form.get('username')?.hasError('required') && myform.submitted"
19 class="invalid-feedback">
20 Username is required
21 </div>
22 <div *ngIf="form.get('username')?.hasError('validateUser') && myform.submitted"
23 class="invalid-feedback">
24 Invalid username
25 </div>
26
27 <label>Password</label>
28 <input formControlName="password" id="password" type="password" class="form-control"
29 [(ngModel)]="loginRequest.password" [ngClass]="{ 'is-invalid': myform.submitted && form.get('password')?.errors?.['required']}" />
30 <div *ngIf="form.get('password')?.hasError('required') && myform.submitted"
31 class="invalid-feedback">
32 Password is required</div>
33
34
35 <div class="p-col-12 p-md-4">
36 <button type="submit" pButton pRipple class="p-button-secondary">Submit</button>
37 </div>
38 </div>
39 </form>
40 </div>
41 </div>
42 </div>
43</div>
Note: See TracBrowser for help on using the repository browser.