diff options
author | Sonja Galovic <galovicsonja@gmail.com> | 2022-05-10 17:54:57 +0200 |
---|---|---|
committer | Sonja Galovic <galovicsonja@gmail.com> | 2022-05-10 17:54:57 +0200 |
commit | 6754cb8d4fa9fe6938eb7c3bea7f60d96caad9e6 (patch) | |
tree | 5d01e7a8fd1fc92b7be114a4e3a4bd1cc2b33591 /frontend/src/app/_modals/register-modal | |
parent | 2c132a08bc852b4e88daf067459856a883329c31 (diff) |
Svi modali/dijalozi: omogucen submit preko entera. Sredjen izgled modala.
Diffstat (limited to 'frontend/src/app/_modals/register-modal')
-rw-r--r-- | frontend/src/app/_modals/register-modal/register-modal.component.html | 2 | ||||
-rw-r--r-- | frontend/src/app/_modals/register-modal/register-modal.component.ts | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/frontend/src/app/_modals/register-modal/register-modal.component.html b/frontend/src/app/_modals/register-modal/register-modal.component.html index d76af4d6..0c791a61 100644 --- a/frontend/src/app/_modals/register-modal/register-modal.component.html +++ b/frontend/src/app/_modals/register-modal/register-modal.component.html @@ -6,7 +6,7 @@ <mat-icon>close</mat-icon> </button> <h1 class="mt-5 mb-4">Registracija</h1> - <form class="mx-4"> + <form class="mx-4" (keydown)="doRegisterWithEnterKey($event)"> <!--Ime--> <div> <mat-form-field appearance="fill"> diff --git a/frontend/src/app/_modals/register-modal/register-modal.component.ts b/frontend/src/app/_modals/register-modal/register-modal.component.ts index 575fc717..a5c6ddc6 100644 --- a/frontend/src/app/_modals/register-modal/register-modal.component.ts +++ b/frontend/src/app/_modals/register-modal/register-modal.component.ts @@ -49,6 +49,11 @@ export class RegisterModalComponent implements OnInit { ngOnInit(): void { } + doRegisterWithEnterKey(keyboardEvent: KeyboardEvent) { + if (keyboardEvent.code == "Enter" || keyboardEvent.code == "NumpadEnter") + this.doRegister(); + } + doRegister() { this.validation(); } |