forked from Pylons/deform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkbox.pt
22 lines (20 loc) · 920 Bytes
/
checkbox.pt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="checkbox">
<label for="${field.oid}">
<input tal:define="name name|field.name;
true_val true_val|field.widget.true_val;
css_class css_class|field.widget.css_class;
style style|field.widget.style;
oid oid|field.oid;
manual_focus manual_focus|field.manual_focus|None"
type="checkbox"
name="${name}" value="${true_val}"
id="${oid}"
tal:attributes="checked cstruct == true_val;
class css_class;
style style;
data-deform-manual-focus manual_focus" />
<span tal:condition="hasattr(field, 'schema') and hasattr(field.schema, 'label')"
tal:replace="field.schema.label" class="checkbox-label" >
</span>
</label>
</div>