Removed modal form validation from question level, now at Modal level.
This commit is contained in:
parent
0f1a4d9641
commit
4e63afb5da
1 changed files with 21 additions and 11 deletions
|
|
@ -48,7 +48,6 @@ import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location
|
||||||
import textBlock from "@/digital-components/text-block/text-block";
|
import textBlock from "@/digital-components/text-block/text-block";
|
||||||
|
|
||||||
// Supporting Files
|
// Supporting Files
|
||||||
import { useForm } from "vee-validate";
|
|
||||||
|
|
||||||
// Define Validation Rules
|
// Define Validation Rules
|
||||||
|
|
||||||
|
|
@ -60,13 +59,6 @@ export default {
|
||||||
answers: [],
|
answers: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
setup() {
|
|
||||||
const modalForm = useForm();
|
|
||||||
|
|
||||||
return {
|
|
||||||
modalForm,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -91,15 +83,24 @@ export default {
|
||||||
alertInvalidZipWidgetName: String,
|
alertInvalidZipWidgetName: String,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
getModalId() {
|
||||||
|
return "#" + this.modalWidgetName;
|
||||||
|
},
|
||||||
mobileLocationLinkPromptText() {
|
mobileLocationLinkPromptText() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "HeaderText");
|
return this.getCmsContent(this.cmsWidgetName, "HeaderText");
|
||||||
},
|
},
|
||||||
mobileLocationLinkText() {
|
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");
|
return this.getCmsContent(this.cmsWidgetName, "BodyText");
|
||||||
},
|
},
|
||||||
getModalId() {
|
|
||||||
return "#" + this.modalWidgetName;
|
|
||||||
},
|
|
||||||
modalHeaderText() {
|
modalHeaderText() {
|
||||||
return this.getCmsContent(this.modalWidgetName, "HeaderText");
|
return this.getCmsContent(this.modalWidgetName, "HeaderText");
|
||||||
},
|
},
|
||||||
|
|
@ -114,6 +115,11 @@ export default {
|
||||||
this.$emit("update:modelValue", newValue);
|
this.$emit("update:modelValue", newValue);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
addressModel: {
|
||||||
|
get: function () {
|
||||||
|
return this.mobileLocationQuestionModel.addressQuestions;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openModal() {
|
openModal() {
|
||||||
|
|
@ -151,4 +157,8 @@ export default {
|
||||||
.address-questions {
|
.address-questions {
|
||||||
margin-top: 0em;
|
margin-top: 0em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mobileLocationLinkPromptId {
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue