1
+ < fieldset
2
+ {% include patterns /form-field-auto-save-attributes %}
3
+ class="
4
+ {% include patterns/form-field-auto-save-classes %}
5
+ pat-checklist
6
+ group
7
+ {{ item.variation }}
8
+ {% if item.depends %}pat-depends{% endif %} "
9
+ {% if item.depends %}data-pat-depends ="{{ item.depends }}; transition: slide "{% endif %} >
10
+ < legend > {% include patterns/i18n id=item.label %} </ legend >
11
+ {% if item.variation == 'checkbox' %}
12
+ {% for subitem in item.items %}
13
+ < label
14
+ class ="{% if subitem.state == 'disabled' %} disabled{% endif %}
15
+ {% if subitem.depends %}pat-depends{% endif %} "
16
+ {% if subitem.depends %}data-pat-depends ="{{ subitem.depends }} "{% endif %} >
17
+ < input
18
+ name ="{{ subitem.name }} "
19
+ type ="checkbox "
20
+ {% if subitem.selected %} checked{% endif %}
21
+ {% if subitem.state == 'disabled ' %} disabled{% endif %} />
22
+ {% if subitem.byline %}
23
+ < strong
24
+ class ="label-fragment-title "> {{ subitem.label }}</ strong >
25
+ < p
26
+ class ="label-fragment-description ">
27
+ {{ subitem.byline }}
28
+ </ p >
29
+ {% else %}
30
+ {% include patterns/i18n id=subitem.label %}
31
+ {% endif %}
32
+ </ label >
33
+ < br />
34
+ {% endfor %}
35
+ {% else %}
36
+ {% for subitem in item.items %}
37
+ < label
38
+ {% if subitem.depends %}class ="pat-depends "{% endif %}
39
+ {% if subitem.depends %}data-pat-depends ="{{ subitem.depends }} "{% endif %} >
40
+ < input
41
+ name ="{{ item.name }} "
42
+ value ="{{ subitem.value }} "
43
+ {% if subitem.selected %} checked{% endif %}
44
+ type ="radio "> {% include patterns/i18n id=subitem.label %} {% if subitem.input %}< input
45
+ type ="{{subitem.input}} "
46
+ name ="{{ subitem.name }}-text " /> {% endif %}
47
+ </ label >
48
+ < br />
49
+ {% endfor %}
50
+ {% endif %}
51
+
52
+ {% if item.help %}
53
+ {% include patterns/form-help.html
54
+ content=item.help more=item.help_more %}
55
+ {% endif %}
56
+
57
+ {% include patterns/form-message.html message=item.message %}
58
+
59
+ {% include patterns/form-has-changes.html %}
60
+
61
+ </ fieldset >
0 commit comments