Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | [# 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 | [is arg0 "hidden"][else] |
| 10 | [if-any arg1]required="required"[end] |
| 11 | [end] |
| 12 | [# TODO(jrobbins): validation] |
| 13 | class="multivalued customfield" style="width: 12em" |
| 14 | aria-labelledby="[fields.field_id]_label"> |
| 15 | [end] |
| 16 | |
| 17 | |
| 18 | [for fields.values] |
| 19 | [if-index fields.values first] |
| 20 | <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]" |
| 21 | class="multivalued customfield" |
| 22 | [is arg0 "hidden"][else] |
| 23 | [if-any arg1]required="required"[end] |
| 24 | [end] |
| 25 | [# TODO(jrobbins): validation] |
| 26 | style="width: 12em" |
| 27 | aria-labelledby="[fields.field_id]_label"><br> |
| 28 | [else] |
| 29 | <span> |
| 30 | <input disabled="disabled" value="[fields.values.val]" |
| 31 | class="multivalued" style="width: 12em" aria-labelledby="[fields.field_id]_label"> |
| 32 | <a href="#" class="removeMultiFieldValueWidget">X</a> |
| 33 | </span> |
| 34 | [end] |
| 35 | [end] |
| 36 | |
| 37 | [for fields.derived_values] |
| 38 | <input disabled="disabled" value="[fields.derived_values.val]" |
| 39 | style="font-style:italic" class="multivalued" style="width: 12em" |
| 40 | aria-labelledby="[fields.field_id]_label"><br> |
| 41 | [end] |