feat: submit change password form by Enter
This commit is contained in:
committed by
Aditya Chandel
parent
8f6e31e2e9
commit
999363fce1
@@ -3,7 +3,7 @@
|
||||
<p-card class="change-password-card p-fluid">
|
||||
|
||||
<ng-template pTemplate="content">
|
||||
<form #changePasswordForm="ngForm">
|
||||
<form #changePasswordForm="ngForm" (ngSubmit)="changePassword()">
|
||||
<div class="p-field">
|
||||
<label for="currentPassword">Current Password</label>
|
||||
<p-password id="currentPassword" [(ngModel)]="currentPassword" name="currentPassword" [feedback]="false" required fluid></p-password>
|
||||
@@ -20,7 +20,7 @@
|
||||
<p-message *ngIf="!passwordsMatch && confirmNewPassword" severity="error" text="New passwords do not match."></p-message>
|
||||
</div>
|
||||
|
||||
<p-button label="Change Password" icon="pi pi-key" (click)="changePassword()" class="p-fluid"></p-button>
|
||||
<p-button type="submit" label="Change Password" icon="pi pi-key" class="p-fluid"></p-button>
|
||||
|
||||
<p-message *ngIf="errorMessage" severity="error" text="{{ errorMessage }}"></p-message>
|
||||
<p-message *ngIf="successMessage" severity="success" text="{{ successMessage }}"></p-message>
|
||||
|
||||
Reference in New Issue
Block a user