|
3 | 3 | <div class="auth-form"> |
4 | 4 | <div class="card my-5"> |
5 | 5 | <div class="card-body"> |
6 | | - <a href="#" class="d-flex justify-content-center"> |
7 | | - <img src="assets/images/logo-dark.svg" alt="logo" /> |
8 | | - </a> |
9 | | - <div class="row"> |
10 | | - <div class="d-flex justify-content-center"> |
11 | | - <div class="auth-header"> |
12 | | - <h2 class="text-secondary mt-5"><b>Hi, Welcome Back</b></h2> |
13 | | - <p class="fs-4 mt-2">Enter your credentials to continue</p> |
| 6 | + <form (ngSubmit)="onSubmit($event)"> |
| 7 | + <a href="#" class="d-flex justify-content-center"> |
| 8 | + <img src="assets/images/logo-dark.svg" alt="logo" /> |
| 9 | + </a> |
| 10 | + <div class="row"> |
| 11 | + <div class="d-flex justify-content-center"> |
| 12 | + <div class="auth-header"> |
| 13 | + <h2 class="text-secondary mt-5"><b>Hi, Welcome Back</b></h2> |
| 14 | + <p class="fs-4 mt-2">Enter your credentials to continue</p> |
| 15 | + </div> |
14 | 16 | </div> |
15 | 17 | </div> |
16 | | - </div> |
17 | | - <div class="d-grid"> |
18 | | - <button type="button" class="btn mt-2 btn-light-primary bg-light text-muted"> |
19 | | - <img src="assets/images/authentication/google-icon.svg" alt="google" /> |
20 | | - Sign In With Google |
21 | | - </button> |
22 | | - </div> |
23 | | - <div class="saprator mt-3"> |
24 | | - <span>or</span> |
25 | | - </div> |
26 | | - <h5 class="my-4 d-flex justify-content-center">Sign in with Email address</h5> |
27 | | - <div class="form-floating mb-3"> |
28 | | - <input type="email" class="form-control" id="floatingInput" value="info@codedthemes.com" /> |
29 | | - <label for="floatingInput">Email address / Username</label> |
30 | | - </div> |
31 | | - <div class="form-floating mb-3"> |
32 | | - <input type="password" class="form-control" id="password" value="12345" /> |
33 | | - <label for="password">Password</label> |
34 | | - </div> |
35 | | - <div class="d-flex mt-1 justify-content-between"> |
36 | | - <div class="form-check"> |
37 | | - <input class="form-check-input input-primary" type="checkbox" id="customCheckc1" checked="" /> |
38 | | - <label class="form-check-label text-muted" for="customCheckc1">Remember me</label> |
| 18 | + <div class="d-grid"> |
| 19 | + <button type="button" class="btn mt-2 btn-light-primary bg-light text-muted"> |
| 20 | + <img src="assets/images/authentication/google-icon.svg" alt="google" /> |
| 21 | + Sign In With Google |
| 22 | + </button> |
39 | 23 | </div> |
40 | | - <h5 class="text-secondary"> |
41 | | - <a href="javascript:">Forgot Password?</a> |
| 24 | + <div class="saprator mt-3"> |
| 25 | + <span>or</span> |
| 26 | + </div> |
| 27 | + <h5 class="my-4 d-flex justify-content-center">Sign in with Email address</h5> |
| 28 | + <div class="form-floating mb-3"> |
| 29 | + <input |
| 30 | + type="email" |
| 31 | + class="form-control" |
| 32 | + id="floatingInput" |
| 33 | + [class.is-invalid]="submitted() && loginForm.email().invalid()" |
| 34 | + placeholder="Email Address" |
| 35 | + [field]="loginForm.email" |
| 36 | + /> |
| 37 | + <label for="floatingInput">Email address / Username</label> |
| 38 | + @if (submitted() && loginForm.email().invalid()) { |
| 39 | + <div class="invalid-feedback"> |
| 40 | + @for (error of loginForm.email().errors(); track error.kind) { |
| 41 | + <div>{{ error.message }}</div> |
| 42 | + } |
| 43 | + </div> |
| 44 | + } |
| 45 | + </div> |
| 46 | + <div class="form-floating mb-3"> |
| 47 | + <input |
| 48 | + type="password" |
| 49 | + id="password" |
| 50 | + class="form-control" |
| 51 | + [field]="loginForm.password" |
| 52 | + [class.is-invalid]="submitted() && loginForm.password().errors().length > 0" |
| 53 | + placeholder="Password (min. 8 characters)" |
| 54 | + /> |
| 55 | + <label for="password">Password</label> |
| 56 | + @if (submitted() && loginForm.password().errors().length > 0) { |
| 57 | + <div class="invalid-feedback"> |
| 58 | + @for (error of loginForm.password().errors(); track error.kind) { |
| 59 | + <div>{{ error.message }}</div> |
| 60 | + } |
| 61 | + </div> |
| 62 | + } |
| 63 | + </div> |
| 64 | + <div class="d-flex mt-1 justify-content-between"> |
| 65 | + <div class="form-check"> |
| 66 | + <input class="form-check-input input-primary" type="checkbox" id="customCheckc1" checked /> |
| 67 | + <label class="form-check-label text-muted" for="customCheckc1">Remember me</label> |
| 68 | + </div> |
| 69 | + <h5 class="text-secondary"> |
| 70 | + <a href="javascript:">Forgot Password?</a> |
| 71 | + </h5> |
| 72 | + </div> |
| 73 | + @if (error()) { |
| 74 | + <div class="alert alert-danger" role="alert"> |
| 75 | + {{ error() }} |
| 76 | + </div> |
| 77 | + } |
| 78 | + <div class="d-grid mt-4"> |
| 79 | + <button type="submit" class="btn btn-secondary">Sign In</button> |
| 80 | + </div> |
| 81 | + <hr /> |
| 82 | + <h5 class="d-flex justify-content-center"> |
| 83 | + <a [routerLink]="['/register']">Don't have an account?</a> |
42 | 84 | </h5> |
43 | | - </div> |
44 | | - <div class="d-grid mt-4"> |
45 | | - <button type="button" class="btn btn-secondary">Sign In</button> |
46 | | - </div> |
47 | | - <hr /> |
48 | | - <h5 class="d-flex justify-content-center"> |
49 | | - <a [routerLink]="['/register']">Don't have an account?</a> |
50 | | - </h5> |
| 85 | + </form> |
51 | 86 | </div> |
52 | 87 | </div> |
53 | 88 | </div> |
|
0 commit comments