Skip to content

Commit 0c0beee

Browse files
committed
fix: indicate un-required field as "(alternative)"
1 parent ce2d04b commit 0c0beee

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/js/ad-hoc/manage-participants-field-required-attr.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ document.addEventListener('DOMContentLoaded', function () {
77
return;
88
}
99

10+
/* to indicate an un-required field is "(alternative)" (not "(important)") */
11+
/* https://github.com/TACC/Core-Styles/blob/v2.57.3/src/lib/_imports/components/c-form.css#L98-L104 */
12+
var style = document.createElement('style');
13+
style.textContent = `
14+
.field-wrapper:not(.required) label[for*="participants"] .asterisk:after {
15+
content: "(alternative)";
16+
}
17+
`;
18+
document.head.appendChild(style);
19+
1020
var textAreaWrapper = textArea.closest('.field-wrapper');
1121
var fileUploadWrapper = fileUpload.closest('.field-wrapper');
1222

0 commit comments

Comments
 (0)