Skip to content

Commit 22d3a47

Browse files
committed
Adds a persistent hint to add more detail for other supplies.
1 parent ac85bcc commit 22d3a47

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

contentcuration/contentcuration/frontend/channelEdit/components/edit/ResourcesNeededOptions.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
clearable
1414
:menu-props="{ offsetY: true, lazy: true, zIndex: 4 }"
1515
:attach="$attrs.id ? `#${$attrs.id}` : '.resources-needed-container'"
16+
:hint="hint"
17+
persistent-hint
1618
/>
1719
</div>
1820

@@ -56,9 +58,16 @@
5658
value: ResourcesNeededTypes[key],
5759
}));
5860
},
61+
hint() {
62+
return this.value && this.value.includes(ResourcesNeededTypes.OTHER_SUPPLIES)
63+
? this.$tr('furtherExplanation')
64+
: '';
65+
},
5966
},
6067
$trs: {
6168
resourcesNeededLabel: 'Requirements',
69+
furtherExplanation:
70+
"Please add to the 'Description' field any additional supplies learners will need in order to use this resource",
6271
},
6372
};
6473

contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/resourcesNeededOptions.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('ResourcesNeededOptions', () => {
3636

3737
it('should emit new input values', () => {
3838
const resourcesNeeded = ['person', 'book', 'train'];
39-
const wrapper = makeWrapper({});
39+
const wrapper = makeWrapper([]);
4040
const dropdown = wrapper.find({ name: 'v-select' });
4141
dropdown.vm.$emit('input', resourcesNeeded);
4242

0 commit comments

Comments
 (0)