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>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div v-if="!suppressError" >
|
||||
<error-message class="row form-test-error mt-1"
|
||||
<div v-if="!suppressError" class="row form-test-error mt-1">
|
||||
<error-message
|
||||
:name="formatString(groupName)"
|
||||
></error-message>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<baseInputButton v-bind="$props" @buttonClicked="handleAnswerChange" v-model="selectedValue">
|
||||
<div class="option-label mb-4"
|
||||
<div class="option-label"
|
||||
:class="[this.buttonLabelSubCopy ? 'has-subheader' : '']"
|
||||
for="testradio">
|
||||
<div class="option-specs">
|
||||
|
|
@ -72,6 +72,14 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.option-wrapper:last-child .option-label{
|
||||
margin-bottom: .25rem;
|
||||
}
|
||||
|
||||
.option-wrapper .option-label{
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.ml-n4 {
|
||||
margin-left: -$spacer * 2;
|
||||
}
|
||||
|
|
@ -79,6 +87,14 @@ export default {
|
|||
margin-right: $spacer * 1.5;
|
||||
}
|
||||
.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 {
|
||||
margin: 0.5rem 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
cmsWidgetName="ShopPreferenceDrawer"
|
||||
ref="ShopPreferenceDrawer"
|
||||
@openSteering="openStateSteeringModal"
|
||||
showSteeringLink=""/>
|
||||
:showSteeringLink="showSteeringLink"/>
|
||||
|
||||
|
||||
|
||||
|
|
@ -81,6 +81,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
selectedProvider : null,
|
||||
showSteeringLink: false
|
||||
};
|
||||
},
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
|
|
@ -123,11 +124,7 @@ export default {
|
|||
}
|
||||
));
|
||||
return modifiedAnswers;
|
||||
},
|
||||
showSteeringLink() {
|
||||
const bodyText = this.getCmsContent("StateSteeringModal", "BodyText");
|
||||
return !!bodyText;
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getHeaderTextFromCms(cmsWidgetName) {
|
||||
|
|
@ -164,10 +161,17 @@ export default {
|
|||
},
|
||||
openStateSteeringModal() {
|
||||
this.$refs["StateSteeringModal"].openModal();
|
||||
}
|
||||
},
|
||||
setShowSteeringLink() {
|
||||
const bodyText = this.$refs["StateSteeringModal"]?.ModalBodyText;
|
||||
console.log(bodyText)
|
||||
console.log(!!bodyText)
|
||||
this.showSteeringLink = !!bodyText;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setupModalLinks(this);
|
||||
this.setShowSteeringLink();
|
||||
if(this.showSteeringLink) {
|
||||
this.openStateSteeringModal();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue