-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform-field-button-bar.html
More file actions
47 lines (47 loc) · 1.42 KB
/
form-field-button-bar.html
File metadata and controls
47 lines (47 loc) · 1.42 KB
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
<!-- <pat-form-field-button-bar> -->
<div
class="
{% if include.depends %}pat-depends{% endif %}
group
pat-form-field-button-bar
{{ include.class }}"
{% if include.depends %}data-pat-depends="{{ include.depends }}"{% endif %}>
<div
class="pat-button-bar">
<!-- <slot id="buttons"> -->
{% for sub in include.items %}
<!-- <pat-button> -->
{% if sub.type == 'link' %}
<a
class="
pat-button
pat-inject"
href="{{ sub.url }}">{%- include patterns/i18n sentinel=false id=sub.label -%}</a>
{% elsif sub.type == 'modal' %}
<a
class="
pat-button
pat-inject"
href="{{ sub.url }}"
data-pat-inject="source: #pat-modal-panel-space; target: #pat-modal-panel-space; url: {{ sub.url }};">{%- include patterns/i18n sentinel=false id=sub.label -%}</a>
{% else %}
<button
{% if sub.url %}
formaction="{{ sub.url }}"
{% endif %}
{% if sub.inject %}
data-pat-inject="{{ sub.inject }}"
{% endif %}
type="{{ sub.type }}"
{% if sub.state == 'disabled' %}disabled{% endif %}
class="
{% if sub.inject %}pat-inject{% endif %}
pat-button
{{ sub.class }}">{%- include patterns/i18n sentinel=false id=sub.label -%}</button>
{% endif %}
<!-- </pat-button> -->
{% endfor %}
<!-- </slot> -->
</div>
</div>
<!-- </pat-form-field-button-bar> -->