CSR-1012 | modal open and close functions
This commit is contained in:
parent
069d31aa30
commit
4bec48f624
2 changed files with 3 additions and 9 deletions
|
|
@ -63,11 +63,10 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
myModal: null,
|
myModal: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.myModal = new Modal(document.getElementById(this.cmsWidgetName));
|
this.myModal = new Modal(document.getElementById(this.cmsWidgetName));
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
ModalHeadline() {
|
ModalHeadline() {
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,13 @@
|
||||||
:text="this.serviceZipDisplayText"
|
:text="this.serviceZipDisplayText"
|
||||||
href="#!"
|
href="#!"
|
||||||
@click-event="openZipCodeModal"
|
@click-event="openZipCodeModal"
|
||||||
:data-bs-target="getModalId"
|
|
||||||
aria-label="Modal window" />
|
aria-label="Modal window" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<modal
|
<modal
|
||||||
ref="zipCodeInputModal"
|
ref="zipCodeInputModal"
|
||||||
:cmsWidgetName="this.modalWidgetName"
|
:cmsWidgetName="this.modalWidgetName"
|
||||||
:onShownCallback="onModalOpen"
|
:onModalOpenedCallback="onModalOpen"
|
||||||
:footerButtonCallback="setZip">
|
:footerButtonCallback="setZip">
|
||||||
<div class="ps-4 pe-4 pb-4">
|
<div class="ps-4 pe-4 pb-4">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
|
|
@ -63,7 +62,6 @@ import textboxQuestion from "@/digital-components/textbox-question/textbox-quest
|
||||||
import { defineRule } from "vee-validate";
|
import { defineRule } from "vee-validate";
|
||||||
import { required, regex } from "@/helpers/validation-rules";
|
import { required, regex } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import { isNoUnitNumericStyleProp } from "@vue/shared";
|
|
||||||
|
|
||||||
// Define Validation Rules
|
// Define Validation Rules
|
||||||
defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED));
|
defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED));
|
||||||
|
|
@ -89,7 +87,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openZipCodeModal() {
|
openZipCodeModal() {
|
||||||
this.$refs.zipCodeInputModal.myModal.show();
|
this.$refs.zipCodeInputModal.openModal();
|
||||||
},
|
},
|
||||||
getZipFromStore() {
|
getZipFromStore() {
|
||||||
return this.$store.getters.order.serviceLocation.zipCode;
|
return this.$store.getters.order.serviceLocation.zipCode;
|
||||||
|
|
@ -149,9 +147,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getModalId() {
|
|
||||||
return "#" + this.modalWidgetName;
|
|
||||||
},
|
|
||||||
questionText() {
|
questionText() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "HeaderText");
|
return this.getCmsContent(this.cmsWidgetName, "HeaderText");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue