CSR-1710
This commit is contained in:
parent
9f2fb8d591
commit
9fcd1c06ae
3 changed files with 17 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
|||
<modalButtonMain
|
||||
isPrimary
|
||||
class="w-100"
|
||||
id="modalbtn"
|
||||
ref="modalButtonMain"
|
||||
loaderColor="white"
|
||||
:buttonText="footerButtonText"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
:headerText="modalHeaderText"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
:onModalOpenedCallback="focusOnPromoInput"
|
||||
@keypress.enter="onEnter"
|
||||
:footerButtonText="modalFooterText"
|
||||
@footer-button-event="addPromoCode">
|
||||
<promoQuestion
|
||||
|
|
@ -162,6 +163,10 @@ export default {
|
|||
openModal() {
|
||||
this.modal.openModal();
|
||||
},
|
||||
onEnter(e) {
|
||||
e.preventDefault();
|
||||
this.modal.validateAndEmit();
|
||||
},
|
||||
closeModal() {
|
||||
this.modal.closeModal();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
:onModalOpenedCallback="onModalOpened"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
:footerButtonText="modalFooterText"
|
||||
@keypress.enter="onEnter"
|
||||
@footer-button-event="setZipCode">
|
||||
<serviceZipQuestion
|
||||
ref="serviceZipQuestion"
|
||||
|
|
@ -108,6 +109,10 @@ export default {
|
|||
const input = document.getElementById(this.serviceZipCodeTextInputId);
|
||||
input?.focus();
|
||||
},
|
||||
focusOnModalButton() {
|
||||
const input = document.getElementById("modalbtn");
|
||||
input?.focus();
|
||||
},
|
||||
copyModel(modelToCopy) {
|
||||
return {
|
||||
state: modelToCopy.state,
|
||||
|
|
@ -117,6 +122,12 @@ export default {
|
|||
openModal() {
|
||||
this.modal.openModal();
|
||||
},
|
||||
onEnter(e) {
|
||||
e.preventDefault();
|
||||
this.focusOnModalButton();
|
||||
this.modal.validateAndEmit();
|
||||
this.focusOnZipInput();
|
||||
},
|
||||
closeModal() {
|
||||
this.modal.closeModal();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue