This commit is contained in:
Bryan Mauger 2023-05-09 08:44:19 -04:00
parent 0c5ac3ef69
commit 04c241b118
2 changed files with 11 additions and 11 deletions

View file

@ -1,6 +1,6 @@
<template> <template>
<div class="textarea-question"> <div class="textarea-question">
<label for="textarea-comments" class="fw-bold mb-1">{{ labelText }} <span class="fw-normal">{{ labelTextOptional }}</span></label> <label for="textarea-comments" class="fw-bold mb-1">{{ labelText }} <span v-if="isRequired" class="fw-normal">(Optional)</span></label>
<textarea <textarea
id="textarea-comments" id="textarea-comments"
class="p-4" class="p-4"
@ -9,8 +9,8 @@
contenteditable="true" contenteditable="true"
aria-multiline="true" aria-multiline="true"
aria-required="false"></textarea> aria-required="false"></textarea>
<p tabindex="0" v-show="footerText" class="caption mt-2 mb-0" id="charactersremaining"> <p tabindex="0" class="caption mt-2 mb-0" id="charactersremaining">
{{ textAreaFooterText }} 250/250 characters remaining
</p> </p>
</div> </div>
</template> </template>
@ -19,6 +19,10 @@
export default { export default {
name: "textareaquestion", name: "textareaquestion",
props: { props: {
cmsWidgetName: String,
isRequired: Boolean,
maxLength: Number,
modelValue: String,
labelText: String, labelText: String,
labelTextOptional: String, labelTextOptional: String,
textAreaFooterText: String, textAreaFooterText: String,

View file

@ -1,11 +1,10 @@
<template> <template>
<textareaquestion <textareaquestion
cmsWidgetName="CustomerDetailsTextAreaLabelText" cmsWidgetName="CustomerDetailsTextAreaLabelText"
:labelText=textAreaLabelCopy :labelText="textAreaLabelCopy"
:labelTextOptional=textAreaLabelCopyOptional :labelTextOptional="textAreaLabelCopyOptional"
textAreaLabelText textAreaLabelText
textAreaFooterText="250/250 characters remaining" isRequired
footerText
/> />
</template> </template>
@ -43,10 +42,7 @@ export default {
computed: { computed: {
textAreaLabelCopy() { textAreaLabelCopy() {
return this.getCmsContent("CustomerDetailsTextAreaLabelText", "HeaderText"); return this.getCmsContent("CustomerDetailsTextAreaLabelText", "HeaderText");
}, }
textAreaLabelCopyOptional() {
return this.getCmsContent("CustomerDetailsTextAreaLabelText", "SubheaderText");
},
} }
}; };
</script> </script>