-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckbox.twig
More file actions
25 lines (25 loc) · 893 Bytes
/
checkbox.twig
File metadata and controls
25 lines (25 loc) · 893 Bytes
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
{% if tri is defined %}
<div role="checkbox" tabindex="0" aria-checked="mixed">
<label>
<input type="radio" name="{{ name }}" value="0" checked>
<span></span>
<span>{{ caption_on }}</span>
<span>{{ caption_off }}</span>
</label>
<input type="radio" name="{{ name }}" value="1">
<input type="radio" name="{{ name }}" value="2">
</div>
{% else %}
<label {% if caption_off is defined or negative ?? false %} class="
{{- caption_off ?? false ? 'option' }}{{ negative ?? false ? ' neg' -}}
"{% endif %}{{ disabled ?? false ? ' inert' -}}
>
<input type="checkbox" class="switch" name="{{ name }}"{{ checked ?? true ? ' checked' }}
{{- disabled ?? false ? ' disabled' }}>
<span></span>
<span>{{ caption_on }}</span>
{% if caption_off is defined %}
<span>{{ caption_off }}</span>
{% endif %}
</label>
{% endif %}