-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-field-attachment.html
55 lines (54 loc) · 1.95 KB
/
form-field-attachment.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{%- capture this_template_id -%}{{ include.label | slugify }}-item-template{%- endcapture -%}
{%- capture this_add_id -%}{{ include.label | slugify }}-add-item{%- endcapture -%}
{%- capture this_id -%}field-{{ include.label | remove: 'label_' | slugify }}{%- endcapture -%}
<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-attachment
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 -%}
{% if include.title %}
<div
class="
item-info-card">
<h1
class="title">
{{ include.title | default: 'Title' }}
</h1>
{% if include.summary %}
<div
class="
pat-rich
description">
{{ include.summary }}
</div>
{% endif %}
{% include patterns/attachments-meta.html
type=item.file_type
size=item.file_size
kind=item.kind
data=item.data
renders=item.renders %}
</div>
{% include patterns/sortable-files-button-bar.html
remove=true
multiple=false
edit-panel=include.edit-panel
%}
{% else %}
{% include patterns/sortable-files-button-bar.html
remove=false
multiple=false
%}
{% endif %}
</fieldset>