From 4e63afb5da1d6b3998a1d962ba4ad95cea1b35da Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 8 Feb 2023 08:23:28 -0500 Subject: [PATCH] Removed modal form validation from question level, now at Modal level. --- .../mobile-location-modal-questions.vue | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 5dab5edf0..8469985fe 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -48,7 +48,6 @@ import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location import textBlock from "@/digital-components/text-block/text-block"; // Supporting Files -import { useForm } from "vee-validate"; // Define Validation Rules @@ -60,13 +59,6 @@ export default { answers: [], }; }, - setup() { - const modalForm = useForm(); - - return { - modalForm, - }; - }, props: { modelValue: { type: Object, @@ -91,15 +83,24 @@ export default { alertInvalidZipWidgetName: String, }, computed: { + getModalId() { + return "#" + this.modalWidgetName; + }, mobileLocationLinkPromptText() { return this.getCmsContent(this.cmsWidgetName, "HeaderText"); }, mobileLocationLinkText() { + if ( + this.addressModel.streetAddress != "" && + this.addressModel.city != "" && + this.addressModel.state != "" && + this.addressModel.zipCode != "" + ) { + return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`; + } return this.getCmsContent(this.cmsWidgetName, "BodyText"); }, - getModalId() { - return "#" + this.modalWidgetName; - }, + modalHeaderText() { return this.getCmsContent(this.modalWidgetName, "HeaderText"); }, @@ -114,6 +115,11 @@ export default { this.$emit("update:modelValue", newValue); }, }, + addressModel: { + get: function () { + return this.mobileLocationQuestionModel.addressQuestions; + }, + }, }, methods: { openModal() { @@ -151,4 +157,8 @@ export default { .address-questions { margin-top: 0em; } + +#mobileLocationLinkPromptId { + white-space: pre-line; +}