Advertisement
Badal_hs_shah

kishan

Jan 18th, 2023
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.36 KB | None | 0 0
  1. <preloader [show]="isLoaderShow"></preloader>
  2. <div class="login-form">
  3.   <div class="text-center mb-4">
  4.     <img src="../../../../assets/images/logo.svg" class="img-fluid portal-logo" />
  5.   </div>
  6.   <div class="card-box">
  7.     <h1 class="text-center mb-4">Login</h1>
  8.     <form [formGroup]="form" (ngSubmit)="onLogin()" *ngIf="form">
  9.       <div class="form-group">
  10.         <label for="email">Email</label><span class="text-danger">*</span>
  11.         <input type="text"
  12.               id="email" name="EmailId"
  13.               placeholder="Email"
  14.               class="form-control"
  15.               maxlength="{{emailMaxLength}}"
  16.               formControlName="EmailId" autocomplete="off" />
  17.         <div *ngIf="(formSubmitted || form.controls.EmailId.touched) && form.controls.EmailId.errors" class="f-error-msg">
  18.           <div *ngIf="form.controls.EmailId.errors.email">Invalid email format</div>
  19.           <div *ngIf="form.controls.EmailId.errors.required">Email is required</div>
  20.         </div>
  21.       </div>
  22.       <div class="form-group">
  23.         <label for="password">Password<span class="text-danger">*</span> <span tooltip="{{passwordCriteria}}" placement="top"><i class="fa fa-info-circle ms-1 text-primary" aria-hidden="true"></i></span></label>
  24.         <div class="position-relative">
  25.           <input type="password"
  26.                 id="password" name="Password"
  27.                 placeholder="Password"
  28.                 class="form-control"
  29.                 maxlength="{{passwordMaxLength}}"
  30.                 formControlName="Password" showHidePassword autocomplete="off" />
  31.         </div>
  32.         <div *ngIf="(formSubmitted || form.controls.Password.touched) && form.controls.Password.errors" class="f-error-msg">
  33.           <div *ngIf="form.controls.Password.errors.password">Password criteria doesn't match.</div>
  34.           <div *ngIf="form.controls.Password.errors.required">Password is required</div>
  35.         </div>
  36.       </div>
  37.       <div class="form-group" *ngIf="invalidLoginAttempts >= maxInvalidAttempts">
  38.         <ngx-recaptcha2 #captchaElem
  39.                        [siteKey]="'6Le6HM4UAAAAAAxLWSlsuOKXQH9yI5CAf7-VGr_g'"
  40.                        [useGlobalDomain]="true"
  41.                        formControlName="Recaptcha">
  42.         </ngx-recaptcha2>
  43.         <div *ngIf="(formSubmitted || form.controls.Recaptcha.touched) && form.controls.Recaptcha.errors" class="f-error-msg">
  44.           <div *ngIf="form.controls.Recaptcha.errors.required">Captcha is required</div>
  45.         </div>
  46.       </div>
  47.       <div class="text-end mb-3">
  48.         <a routerLink="/forgot-password"
  49.           class="text-dark cursor-pointer"><i class="fa fa-lock"></i> Forgot your password?</a>
  50.       </div>
  51.       <button id="Login"
  52.              type="submit"
  53.              [ngClass]="{'btn-success':form.valid,'btn-subdued':form.invalid}"
  54.              class="btn w-100">
  55.         Login
  56.       </button>
  57.       <div class="row pt-3">
  58.         <div class="col-6 text-start"><a class="text-dark cursor-pointer" routerLink="/service-signup"><i class="fa fa-sign-in"></i> Sign up</a></div>
  59.       </div>
  60.     </form>
  61.   </div>
  62.   <div class="text-center mt-3"><p class="mb-0">©2020 Arcora Foundation.</p></div>
  63. </div>
  64. <ng-template #defaultAccountSelectionModal>
  65.   <div class="modal-header">
  66.     <h1 class="modal-title">
  67.       Select account for login
  68.     </h1>
  69.     <button (click)="closeDefaultAccountSelectionPopup()"
  70.            aria-label="Close"
  71.            class="close fa fa-close custom-button-track-event"
  72.            id="close-btn"
  73.            type="button"></button>
  74.   </div>
  75.   <form [formGroup]="multipleAccountForm" *ngIf="multipleAccountForm" (ngSubmit)="onSubmit()">
  76.     <div class="modal-body">
  77.       <div class="row">
  78.         <div class="col-sm-12 form-group">
  79.           Multiple accounts have been found. please select one for login.
  80.         </div>
  81.         <div class="col-sm-12 form-group">
  82.           <select class="custom-select"
  83.                  (change)="onChangeAccount($event)"
  84.                  formControlName="AccountId">
  85.             <option value=null>Select account</option>
  86.             <option [value]="account.AccountId" *ngFor="let account of accountList">{{account.AccountName}}</option>
  87.           </select>
  88.           <div *ngIf="(multipleAccountFormSubmitted || multipleAccountForm?.controls.AccountId.touched) && multipleAccountForm?.controls.AccountId.errors" class="f-error-msg">
  89.             <div *ngIf="multipleAccountForm?.controls.AccountId.errors.required">Please select account.</div>
  90.           </div>
  91.         </div>
  92.       </div>
  93.     </div>
  94.     <div>
  95.       <div class="modal-footer flex-column flex-sm-row">
  96.         <button id="save-form" type="button"
  97.                [ngClass]="{'btn-success':multipleAccountForm.valid,'btn-subdued':multipleAccountForm.invalid}"
  98.                class="btn save-btn btn-simple me-2" (click)="onSubmit(false)">
  99.           <i class="fa fa-sign-in"></i> Login as admin
  100.         </button>
  101.         <button id="save-form" type="button"
  102.                [ngClass]="{'btn-success':multipleAccountForm.valid,'btn-subdued':multipleAccountForm.invalid && multipleAccountForm.dirty ,'not-allowed':!hasBothPermission}"
  103.                class="btn save-btn btn-simple" [disabled]="!hasBothPermission" (click)="onSubmit(true)">
  104.           <i class="fa fa-sign-in"></i> Login as user
  105.         </button>
  106.       </div>
  107.     </div>
  108.   </form>
  109. </ng-template>
  110.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement