aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/confirm
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/confirm')
-rw-r--r--client/src/app/shared/confirm/confirm.component.html8
-rw-r--r--client/src/app/shared/confirm/confirm.component.ts3
2 files changed, 7 insertions, 4 deletions
diff --git a/client/src/app/shared/confirm/confirm.component.html b/client/src/app/shared/confirm/confirm.component.html
index 65df1cd4d..dbc8c23e3 100644
--- a/client/src/app/shared/confirm/confirm.component.html
+++ b/client/src/app/shared/confirm/confirm.component.html
@@ -16,11 +16,15 @@
16 </div> 16 </div>
17 17
18 <div class="modal-footer inputs"> 18 <div class="modal-footer inputs">
19 <span i18n class="action-button action-button-cancel" (click)="dismiss()" role="button">Cancel</span> 19 <input
20 type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
21 (click)="dismiss()" (key.enter)="dismiss()"
22 >
20 23
21 <input 24 <input
25 ngbAutofocus
22 type="submit" [value]="confirmButtonText" class="action-button-submit" [disabled]="isConfirmationDisabled()" 26 type="submit" [value]="confirmButtonText" class="action-button-submit" [disabled]="isConfirmationDisabled()"
23 (click)="close()" 27 (click)="close()" (key.enter)="confirm()"
24 > 28 >
25 </div> 29 </div>
26</ng-template> 30</ng-template>
diff --git a/client/src/app/shared/confirm/confirm.component.ts b/client/src/app/shared/confirm/confirm.component.ts
index 763454c4f..c6e40fe72 100644
--- a/client/src/app/shared/confirm/confirm.component.ts
+++ b/client/src/app/shared/confirm/confirm.component.ts
@@ -45,7 +45,6 @@ export class ConfirmComponent implements OnInit {
45 ) 45 )
46 } 46 }
47 47
48 @HostListener('document:keydown.enter')
49 confirm () { 48 confirm () {
50 if (this.openedModal) this.openedModal.close() 49 if (this.openedModal) this.openedModal.close()
51 } 50 }
@@ -60,7 +59,7 @@ export class ConfirmComponent implements OnInit {
60 showModal () { 59 showModal () {
61 this.inputValue = '' 60 this.inputValue = ''
62 61
63 this.openedModal = this.modalService.open(this.confirmModal) 62 this.openedModal = this.modalService.open(this.confirmModal, { centered: true })
64 63
65 this.openedModal.result 64 this.openedModal.result
66 .then(() => this.confirmService.confirmResponse.next(true)) 65 .then(() => this.confirmService.confirmResponse.next(true))