error styling and refactor of showing steering modal
This commit is contained in:
parent
7103951114
commit
355c41f8e3
3 changed files with 30 additions and 10 deletions
|
|
@ -67,8 +67,8 @@
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!suppressError" >
|
<div v-if="!suppressError" class="row form-test-error mt-1">
|
||||||
<error-message class="row form-test-error mt-1"
|
<error-message
|
||||||
:name="formatString(groupName)"
|
:name="formatString(groupName)"
|
||||||
></error-message>
|
></error-message>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<baseInputButton v-bind="$props" @buttonClicked="handleAnswerChange" v-model="selectedValue">
|
<baseInputButton v-bind="$props" @buttonClicked="handleAnswerChange" v-model="selectedValue">
|
||||||
<div class="option-label mb-4"
|
<div class="option-label"
|
||||||
:class="[this.buttonLabelSubCopy ? 'has-subheader' : '']"
|
:class="[this.buttonLabelSubCopy ? 'has-subheader' : '']"
|
||||||
for="testradio">
|
for="testradio">
|
||||||
<div class="option-specs">
|
<div class="option-specs">
|
||||||
|
|
@ -72,6 +72,14 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.option-wrapper:last-child .option-label{
|
||||||
|
margin-bottom: .25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-wrapper .option-label{
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.ml-n4 {
|
.ml-n4 {
|
||||||
margin-left: -$spacer * 2;
|
margin-left: -$spacer * 2;
|
||||||
}
|
}
|
||||||
|
|
@ -79,6 +87,14 @@ export default {
|
||||||
margin-right: $spacer * 1.5;
|
margin-right: $spacer * 1.5;
|
||||||
}
|
}
|
||||||
.option-main {
|
.option-main {
|
||||||
|
|
||||||
|
.has-error > .option-label {
|
||||||
|
border: 1px solid $red !important;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 0 4px $red-200 !important;
|
||||||
|
z-index: 5 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.option-wrapper {
|
.option-wrapper {
|
||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
cmsWidgetName="ShopPreferenceDrawer"
|
cmsWidgetName="ShopPreferenceDrawer"
|
||||||
ref="ShopPreferenceDrawer"
|
ref="ShopPreferenceDrawer"
|
||||||
@openSteering="openStateSteeringModal"
|
@openSteering="openStateSteeringModal"
|
||||||
showSteeringLink=""/>
|
:showSteeringLink="showSteeringLink"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -81,6 +81,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedProvider : null,
|
selectedProvider : null,
|
||||||
|
showSteeringLink: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -123,11 +124,7 @@ export default {
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
return modifiedAnswers;
|
return modifiedAnswers;
|
||||||
},
|
}
|
||||||
showSteeringLink() {
|
|
||||||
const bodyText = this.getCmsContent("StateSteeringModal", "BodyText");
|
|
||||||
return !!bodyText;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getHeaderTextFromCms(cmsWidgetName) {
|
getHeaderTextFromCms(cmsWidgetName) {
|
||||||
|
|
@ -164,10 +161,17 @@ export default {
|
||||||
},
|
},
|
||||||
openStateSteeringModal() {
|
openStateSteeringModal() {
|
||||||
this.$refs["StateSteeringModal"].openModal();
|
this.$refs["StateSteeringModal"].openModal();
|
||||||
}
|
},
|
||||||
|
setShowSteeringLink() {
|
||||||
|
const bodyText = this.$refs["StateSteeringModal"]?.ModalBodyText;
|
||||||
|
console.log(bodyText)
|
||||||
|
console.log(!!bodyText)
|
||||||
|
this.showSteeringLink = !!bodyText;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
|
this.setShowSteeringLink();
|
||||||
if(this.showSteeringLink) {
|
if(this.showSteeringLink) {
|
||||||
this.openStateSteeringModal();
|
this.openStateSteeringModal();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue