46 lines
2.8 KiB
HTML
46 lines
2.8 KiB
HTML
<div class="row">
|
|
<div class="col-md-12">
|
|
<nb-card>
|
|
<nb-card-header style="text-align: center;"><img src="assets/images/VN_Medical_Logo.png" alt="vnms" width="120" height="50" style="padding-right: 1rem;"> </nb-card-header>
|
|
<nb-card-body>
|
|
<form [formGroup]="loginForm" (ngSubmit)="onSubmit()">
|
|
<div class="form-group">
|
|
<label for="exampleInputEmail1" class="label">Email address</label>
|
|
<input type="email" formControlName="email" nbInput fullWidth id="exampleInputEmail1" placeholder="Email" [status]="loginForm.get('email').dirty ? (loginForm.get('email').invalid ? 'danger' : 'success') : 'basic'"
|
|
[attr.aria-invalid]="loginForm.get('email').invalid && loginForm.get('email').touched ? true : null">
|
|
<ng-container nbInputErrorMessage>
|
|
<div style="color:red" *ngIf="loginForm.get('email').hasError('required') && loginForm.get('email').touched">Email is required.</div>
|
|
|
|
<div style="color:red" *ngIf="!loginForm.get('email')?.errors?.required && (loginForm.get('email')?.errors?.pattern)">
|
|
Please enter a valid email address
|
|
</div>
|
|
</ng-container>
|
|
</div>
|
|
<div class="form-group">
|
|
<nb-form-field>
|
|
<label for="exampleInputEmail1" class="label">Password</label>
|
|
<input [type]="getInputType()" nbInput formControlName="password" placeholder="Password">
|
|
<nb-icon class="eyeIcon" (click)="toggleShowPassword()" style="margin-left: -2rem;" nbSuffix [icon]="showPassword ? 'eye-outline' : 'eye-off-2-outline'"
|
|
pack="eva"
|
|
[attr.aria-label]="showPassword ? 'hide password' : 'show password'">
|
|
</nb-icon>
|
|
<ng-container nbInputErrorMessage>
|
|
<div style="color:red" *ngIf="loginForm.get('password').hasError('required') && loginForm.get('password').touched">Password is required.</div>
|
|
<div style="color:#7c0e0e" *ngIf="!loginForm.get('password')?.errors?.required && (loginForm.get('password')?.errors?.pattern)">
|
|
Password length must be greater than or equal to 8, and the password must contain one or more uppercase, lowercase, numeric, and special characters.
|
|
</div>
|
|
</ng-container>
|
|
</nb-form-field>
|
|
</div>
|
|
<div class="form-group">
|
|
<span class="label-with-link">
|
|
<a class="forgot-password caption-2" routerLink="../request-password" (click)="openForgot()">Forgot Password?</a>
|
|
</span>
|
|
</div>
|
|
<button type="submit" [disabled]="!loginForm.valid" nbButton fullWidth status="success" size="large">Sign in</button>
|
|
</form>
|
|
</nb-card-body>
|
|
</nb-card>
|
|
</div>
|
|
</div>
|