2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-10-31 09:20:27 +00:00
RTL/src/app/shared/components/settings/auth-settings/auth-settings.component.html
ShahanaFarooqui 9a6281f234 Bug fix for change password buttons
Bug fix for change password buttons
2023-01-06 17:44:51 -08:00

42 lines
2.4 KiB
HTML

<div fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch" class="padding-gap-x-large">
<form *ngIf="appConfig?.allowPasswordUpdate" #authForm="ngForm" fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch" class="page-sub-title-container mt-1">
<div fxLayout="row" fxLayoutAlign="start start" class="mb-2">
<fa-icon class="page-title-img mr-1" [icon]="faLock"></fa-icon>
<span class="page-title">Password</span>
</div>
<mat-form-field>
<mat-label>Current Password</mat-label>
<input autoFocus matInput type="password" id="currpassword" name="currpassword" tabindex="1" required [(ngModel)]="currPassword">
<mat-error *ngIf="!currPassword">Current password is required.</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>New Password</mat-label>
<input matInput type="password" id="newpassword" name="newpassword" tabindex="2" required [(ngModel)]="newPassword">
<mat-error *ngIf="matchOldAndNewPasswords()">{{errorMsg}}</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Confirm New Password</mat-label>
<input matInput type="password" id="confirmpassword" name="confirmpassword" tabindex="3" required [(ngModel)]="confirmPassword">
<mat-error *ngIf="matchNewPasswords()">{{errorConfirmMsg}}</mat-error>
</mat-form-field>
<div fxLayout="row" fxLayoutAlign="start start" class="mt-1">
<button class="mr-1" mat-stroked-button color="primary" type="reset" tabindex="4" (click)="onResetPassword()">Reset</button>
<button mat-flat-button color="primary" tabindex="5" type="submit" (click)="onChangePassword()">Change Password</button>
</div>
</form>
<mat-divider class="my-2"></mat-divider>
<div fxLayout="column" fxLayoutAlign="start stretch">
<div class="mb-1 settings-container page-sub-title-container mt-1">
<fa-icon class="page-title-img mr-1" [icon]="faUserClock"></fa-icon>
<span class="page-title">Two Factor Authentication</span>
</div>
<div class="alert alert-info">
<fa-icon class="mt-1 mr-1 alert-icon" [icon]="faInfoCircle"></fa-icon>
<span>Protect your account from unauthorized access by requiring a second authentication method in addition to your password.</span>
</div>
<div class="mt-1">
<button mat-flat-button color="primary" tabindex="6" class="mb-2" (click)="on2FAuth()">{{appConfig.enable2FA ? 'Disable 2FA' : 'Enable 2FA'}}</button>
</div>
</div>
</div>