Merge pull request #523 from Safelite/feature/richardson/SSR-1052
fix for modal button being actually disabled and keep styling
This commit is contained in:
commit
3205612629
4 changed files with 26 additions and 4 deletions
|
|
@ -34,7 +34,6 @@
|
||||||
loaderColor="white"
|
loaderColor="white"
|
||||||
:buttonText="footerButtonText"
|
:buttonText="footerButtonText"
|
||||||
:class="(isButtonDisabled || isFooterButtonDisabled) && 'form-test-invalid'"
|
:class="(isButtonDisabled || isFooterButtonDisabled) && 'form-test-invalid'"
|
||||||
:isDisabled="(isButtonDisabled || isFooterButtonDisabled)"
|
|
||||||
@clickEvent="validateAndEmit" />
|
@clickEvent="validateAndEmit" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ function getCmsSiteHeader(cmsResponse) {
|
||||||
const { parentAccountNumber } = useMainStore().issConfig;
|
const { parentAccountNumber } = useMainStore().issConfig;
|
||||||
let headerAnswersToUse = siteHeader.Answers
|
let headerAnswersToUse = siteHeader.Answers
|
||||||
.find((answer) => answer.AccountNumber === parentAccountNumber.toString());
|
.find((answer) => answer.AccountNumber === parentAccountNumber.toString());
|
||||||
if (headerAnswersToUse === null) {
|
if (headerAnswersToUse == null) {
|
||||||
headerAnswersToUse = siteHeader.Answers
|
headerAnswersToUse = siteHeader.Answers
|
||||||
.find((answer) => answer.AccountNumber === '0');
|
.find((answer) => answer.AccountNumber === '0');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,28 @@ export default ({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setupHeader() {
|
setupHeader() {
|
||||||
|
const overrideCmsHeaderAnswers = this.getCmsContent(this.cmsWidgetName, 'Answers');
|
||||||
|
if (overrideCmsHeaderAnswers && Array.isArray(overrideCmsHeaderAnswers)) {
|
||||||
|
const { parentAccountNumber } = useMainStore().issConfig;
|
||||||
|
let headerOverrideToUse = overrideCmsHeaderAnswers
|
||||||
|
.find((answer) => answer.AccountNumber === parentAccountNumber.toString());
|
||||||
|
if (headerOverrideToUse == null) {
|
||||||
|
headerOverrideToUse = overrideCmsHeaderAnswers
|
||||||
|
.find((answer) => answer.AccountNumber === '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (headerOverrideToUse) {
|
||||||
|
this.cmsClientHeader = {
|
||||||
|
altText: headerOverrideToUse.AltText,
|
||||||
|
clientName: headerOverrideToUse.ClientName,
|
||||||
|
hexCode: headerOverrideToUse.HexCode,
|
||||||
|
imageId: headerOverrideToUse.ImageId,
|
||||||
|
imageUrl: headerOverrideToUse.AnswerImageUrl
|
||||||
|
};
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const { clientHeader } = useMainStore().issConfig;
|
const { clientHeader } = useMainStore().issConfig;
|
||||||
if (clientHeader) {
|
if (clientHeader) {
|
||||||
this.cmsClientHeader = clientHeader;
|
this.cmsClientHeader = clientHeader;
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,12 @@ $limu-button-color: #A9E3E9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
&.btn-override[aria-disabled="false"]{
|
&.btn-override[aria-disabled="false"]:not(.form-test-invalid) {
|
||||||
&.btn-primary {
|
&.btn-primary {
|
||||||
background: $limu-button-color !important;
|
background: $limu-button-color !important;
|
||||||
color: $limu-button-text-color !important;
|
color: $limu-button-text-color !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
background: $limu-button-color !important;
|
background: $limu-button-color !important;
|
||||||
color: $limu-button-text-color !important;
|
color: $limu-button-text-color !important;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue