feat: submit auth form by pressing Enter after typing password

This commit is contained in:
Oleh Astappiev
2025-04-19 10:58:22 -06:00
committed by Aditya Chandel
parent 6af3ee7019
commit 8f6e31e2e9
@@ -5,7 +5,7 @@
<ng-template pTemplate="title">Login</ng-template>
<ng-template pTemplate="content">
<form #loginForm="ngForm">
<form #loginForm="ngForm" (ngSubmit)="login()">
<div class="p-field">
<label for="username">Username</label>
<input pInputText id="username" [(ngModel)]="username" name="username" required fluid/>
@@ -17,7 +17,7 @@
</div>
<div class="p-mt-3">
<p-button label="Login" icon="pi pi-sign-in" (click)="login()" class="p-fluid"></p-button>
<p-button type="submit" label="Login" icon="pi pi-sign-in" class="p-fluid"></p-button>
</div>
<p-message *ngIf="errorMessage" severity="error" text="{{ errorMessage }}"></p-message>