blob: 27bd9fea4ef0d243a10ae131a37f4ce7f28ea65c [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001[# Even though this field definition says it is single-valued, the issue might have
2 multiple values if the field definition was previously multi-valued. In such a situation
3 values other than the first value are shown read-only and must be explicitly removed
4 before the comment can be submitted. ]
5
6[# If the field has no explicit values, then show an empty form element.]
7[if-any fields.values][else]
8 <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]" value=""
9 class="multivalued customfield"
10 [is arg0 "hidden"][else]
11 [if-any arg1]required="required"[end]
12 [end]
13 style="width: 12em" aria-labelledby="[fields.field_id]_label">
14[end]
15
16[for fields.values]
17 [if-index fields.values first]
18 <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
19 class="multivalued customfield"
20 [is arg0 "hidden"][else]
21 [if-any arg1]required="required"[end]
22 [end]
23 style="width: 12em" aria-labelledby="[fields.field_id]_label"><br>
24 [else]
25 <span>
26 <input disabled="disabled" value="[fields.values.val]"
27 class="multivalued" style="width: 12em" aria-labelledby="[fields.field_id]_label">
28 <a href="#" class="removeMultiFieldValueWidget">X</a>
29 </span>
30 [end]
31[end]