blob: 3593fa27878c7c6f4b128040bae47bce79542b11 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001[# Display widgets for editing one custom field.
2 The variable "fields" must already refer to a FieldValueView object.
3 arg0: True if the field is multi-valued.
4 arg1: Prefix for IDs
5 arg2: True if the field should be required
6 arg3: Parent phase name suffix if any.
7]
8[is fields.field_def.type_name "ENUM_TYPE"]
9 [if-any arg0]
10 [include "field-value-multi-enum.ezt" arg1 arg2 arg3]
11 [else]
12 [include "field-value-single-enum.ezt" arg1 arg2 arg3]
13 [end]
14[end]
15
16[is fields.field_def.type_name "INT_TYPE"]
17 [if-any arg0]
18 [include "field-value-multi-int.ezt" arg1 arg2 arg3]
19 [else]
20 [include "field-value-single-int.ezt" arg1 arg2 arg3]
21 [end]
22[end]
23
24[is fields.field_def.type_name "STR_TYPE"]
25 [if-any arg0]
26 [include "field-value-multi-str.ezt" arg1 arg2 arg3]
27 [else]
28 [include "field-value-single-str.ezt" arg1 arg2 arg3]
29 [end]
30[end]
31
32[is fields.field_def.type_name "USER_TYPE"]
33 [if-any arg0]
34 [include "field-value-multi-user.ezt" arg1 arg2 arg3]
35 [else]
36 [include "field-value-single-user.ezt" arg1 arg2 arg3]
37 [end]
38[end]
39
40[is fields.field_def.type_name "DATE_TYPE"]
41 [if-any arg0]
42 [include "field-value-multi-date.ezt" arg1 arg2 arg3]
43 [else]
44 [include "field-value-single-date.ezt" arg1 arg2 arg3]
45 [end]
46[end]
47
48[is fields.field_def.type_name "URL_TYPE"]
49 [if-any arg0]
50 [include "field-value-multi-url.ezt" arg1 arg2 arg3]
51 [else]
52 [include "field-value-single-url.ezt" arg1 arg2 arg3]
53 [end]
54[end]
55
56[# TODO(jrobbins): more field types. ]