Skip to content

Commit 639e2df

Browse files
committed
Mark beginning and end of components
1 parent fac7e29 commit 639e2df

14 files changed

+582
-482
lines changed

form-component.html

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{% if item.type == "title" %}
22
{% if title_nr >= 2 %}
3+
<!-- </slot> -->
34
</fieldset>
5+
<!-- </form-panel> -->
6+
<!-- <form-panel> -->
47
<fieldset
58
class="
69
form-panel
@@ -14,6 +17,7 @@
1417
{% if include.scroll-offset %}scroll-offset: {{ include.scroll-offset }}{% endif %}"
1518
id="{{ item.label | slugify }}">
1619
{% endif %}
20+
<slot name="fields">
1721
<h3
1822
class="
1923
{% if item.depends %}pat-depends{% endif %}

form-field-checklist.html

+42-40
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1-
<fieldset
2-
{% include patterns/form-field-auto-save-attributes %}
3-
class="
4-
pat-checklist
5-
{{ include.class }}
6-
{% include patterns/form-field-auto-save-classes %}
7-
{% if include.depends %}pat-depends{% endif %}"
8-
{% if include.depends %}data-pat-depends="{{ include.depends }}; transition: slide"{% endif %}>
9-
<legend>
10-
{% include patterns/form-field-label-conditional.html %}
11-
</legend>
12-
<div
13-
class="pat-checklist">
14-
{% for sub in item.items %}
15-
<label>
16-
{% include patterns/i18n id=sub.label %}
17-
<input
18-
{% if include.variation == 'radio' %}
19-
{% if sub.value %}
20-
value="{{ sub.value }}"
21-
{% else %}
22-
value="{{ sub.label | remove: 'label_' | slugify }}"
1+
<!-- <pat-form-field-checklist> -->
2+
<fieldset
3+
{% include patterns/form-field-auto-save-attributes %}
4+
class="
5+
pat-checklist
6+
{{ include.class }}
7+
{% include patterns/form-field-auto-save-classes %}
8+
{% if include.depends %}pat-depends{% endif %}"
9+
{% if include.depends %}data-pat-depends="{{ include.depends }}; transition: slide"{% endif %}>
10+
<legend>
11+
{% include patterns/form-field-label-conditional.html %}
12+
</legend>
13+
<div
14+
class="pat-checklist">
15+
{% for sub in item.items %}
16+
<label>
17+
{% include patterns/i18n id=sub.label %}
18+
<input
19+
{% if include.variation == 'radio' %}
20+
{% if sub.value %}
21+
value="{{ sub.value }}"
22+
{% else %}
23+
value="{{ sub.label | remove: 'label_' | slugify }}"
24+
{% endif %}
2325
{% endif %}
24-
{% endif %}
25-
{% if sub.selected == 'selected' %}
26-
checked
27-
{% endif %}
28-
{% if sub.disabled %}
29-
disabled
30-
{% endif %}
31-
name="
32-
{%- if include.variation == 'radio' -%}
33-
{{ include.label | slugify | default: 'some_name_for_the_radios' }}
34-
{%- else -%}
35-
{{ sub.label | remove: 'label_' | slugify }}
36-
{%- endif -%}"
37-
type="{{ include.variation | default: 'checkbox' }}">
38-
</label>
39-
{% endfor %}
40-
</div>
41-
</fieldset>
26+
{% if sub.selected == 'selected' %}
27+
checked
28+
{% endif %}
29+
{% if sub.disabled %}
30+
disabled
31+
{% endif %}
32+
name="
33+
{%- if include.variation == 'radio' -%}
34+
{{ include.label | slugify | default: 'some_name_for_the_radios' }}
35+
{%- else -%}
36+
{{ sub.label | remove: 'label_' | slugify }}
37+
{%- endif -%}"
38+
type="{{ include.variation | default: 'checkbox' }}">
39+
</label>
40+
{% endfor %}
41+
</div>
42+
</fieldset>
43+
<!-- </pat-form-field-checklist> -->

form-field-email.html

+21-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
<label
2-
{% include patterns/form-field-auto-save-attributes %}
3-
class="
4-
{% include patterns/form-field-auto-save-classes %}
5-
{% if item.depends %}pat-depends{% endif %}"
6-
{% if item.depends %}data-pat-depends="{{ item.depends }}; transition: slide"{% endif %}>
7-
{% include patterns/form-field-label-conditional.html %}
8-
<input
9-
type="email"
10-
name="{{ item.name }}"
11-
size="{{ item.chars }}"
12-
value="{{ item.value }}" />
1+
<!-- <pat-form-field-email> -->
2+
<label
3+
{% include patterns/form-field-auto-save-attributes %}
4+
class="
5+
{% include patterns/form-field-auto-save-classes %}
6+
{% if item.depends %}pat-depends{% endif %}"
7+
{% if item.depends %}data-pat-depends="{{ item.depends }}; transition: slide"{% endif %}>
8+
{% include patterns/form-field-label-conditional.html %}
9+
<input
10+
type="email"
11+
name="{{ item.name }}"
12+
size="{{ item.chars }}"
13+
value="{{ item.value }}" />
1314

14-
{% if item.help %}
15-
{% include patterns/form-help.html
16-
content=item.help more=item.help_more %}
17-
{% endif %}
15+
{% if item.help %}
16+
{% include patterns/form-help.html
17+
content=item.help more=item.help_more %}
18+
{% endif %}
1819

19-
{% include patterns/form-has-changes.html %}
20-
{% include patterns/form-message.html message=item.message %}
21-
</label>
20+
{% include patterns/form-has-changes.html %}
21+
{% include patterns/form-message.html message=item.message %}
22+
</label>
23+
<!-- </pat-form-field-email> -->

0 commit comments

Comments
 (0)