diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue
index 013a42168..6e8e7de07 100644
--- a/src/digital-components/modal/modal.vue
+++ b/src/digital-components/modal/modal.vue
@@ -2,7 +2,7 @@
import buttonMain from "@/ux-components/button-main/button-main";
+import { Modal } from "bootstrap";
export default {
name: "modal",
props: {
cmsWidgetName: String,
- onShownCallback: {
+ onModalOpenedCallback: {
type: Function,
},
@@ -59,6 +60,14 @@ export default {
// if undefined, footer button closes modal
},
},
+ data() {
+ return {
+ myModal: null,
+ };
+ },
+ mounted() {
+ this.myModal = new Modal(document.getElementById(this.cmsWidgetName));
+ },
computed: {
ModalHeadline() {
return this.getCmsContent(this.cmsWidgetName, "HeaderText");
@@ -86,8 +95,11 @@ export default {
resetButtonStyle() {
this.$refs.buttonMain.resetButtonStyle();
},
+ openModal() {
+ this.myModal.show();
+ },
closeModal() {
- this.$refs.modalXButton.click();
+ this.myModal.hide();
},
async footerButtonClick() {
if (this.footerButtonCallback) {
diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue
index 1ab55f165..169281b71 100644
--- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue
+++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue
@@ -1,25 +1,25 @@