diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index f4a7d2afc..bab1664f0 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -51,6 +51,7 @@ export default { default: '', }, validationRules: String, + cmsWidgetName: String, }, setup(props) { const fieldOptions = { @@ -85,6 +86,9 @@ export default { }, }, computed: { + questionTextNew(){ + return this.getCmsContent(this.cmsWidgetName).QuestionText ? this.getCmsContent(this.cmsWidgetName).QuestionText : ''; + }, value: { get: function() { return this.modelValue; @@ -95,7 +99,7 @@ export default { }, labelText: { get: function () { - let labelText = this.questionText; + let labelText = this.questionTextNew; if (this.disableAutoFill) { var noBreakChar = "⁠"; var position = 1; diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index f34a674e3..af3be061c 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -11,7 +11,7 @@
- +
@@ -47,7 +47,7 @@ />
- +
{ + vm.setCmsContent(resultMap); vm.$refs.funnelHeader.initializeComponent( resultMap.cmsContent.FunnelHeaderWidget ); @@ -127,8 +129,8 @@ export default { ); vm.noServiceZipWidget = { headline: resultMap.cmsContent.NoServiceZipWidget.HeadlineText, - copy: resultMap.cmsContent.NoServiceZipWidget.BodyText - }; + copy: resultMap.cmsContent.NoServiceZipWidget.BodyText, + }; vm.noMatchAlertWidget = { headline: resultMap.cmsContent.NoMatchAlertWidget.HeadlineText, copy: resultMap.cmsContent.NoMatchAlertWidget.BodyText diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index f54909d06..5b66b5016 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -7,9 +7,17 @@ import { vehicleCategories } from "@/constants/vehicle-categories.js"; export default { data() { - return {}; + return { + cmsContentByWidget: {} + }; }, methods: { + setCmsContent(cmsContent){ + this.$root.cmsContentByWidget = cmsContent; + }, + getCmsContent(widgetName){ + return this.$root === undefined ? null : this.$root.cmsContentByWidget.cmsContent[widgetName]; + }, dispatchNonBlockingStoreAction(type, payload, encodePayload = true) { // Encode the payload if required if (encodePayload) {