-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-field-attachments.html
34 lines (34 loc) · 1.37 KB
/
form-field-attachments.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{%- capture this_template_id -%}{{ include.label | slugify | default: 'attachments' }}-item-template{%- endcapture -%}
{%- capture this_add_id -%}{{ include.label | slugify }}-add-item{%- endcapture -%}
{%- capture this_id -%}field-{{ include.label | remove: 'label_' | slugify }}{%- endcapture -%}
<!-- <pat-form-field-attachments> -->
<fieldset
{% include patterns/form-field-id %}
data-pat-inject="
url: {{ include.action | default: page.url }};
source: #{{ this_id }}-list::element;
target: #{{ this_id }}-list::element"
class="
{{ include.class }}
group
pat-form-field-attachments
pat-autosubmit
pat-inject
pat-subform
{% if include.depends %}pat-depends{% endif %}">
{% if include.label %}<legend>{% include patterns/form-field-label-conditional.html %}</legend>{% endif %}
{%- capture list_id -%}{{ include.id }}-list{%- endcapture -%}
{% unless include.data == false %}
{% include patterns/sortable-files.html
edit-panel=include.edit-panel
picker=include.picker
id=list_id
data=include.data %}
{% endunless %}
{% include patterns/sortable-files-button-bar.html
upload=include.upload
picker=include.picker
add=include.add
multiple=true %}
</fieldset>
<!-- </pat-form-field-attachments> -->