forked from Pylons/deform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkbox_choice.pt
26 lines (26 loc) · 1019 Bytes
/
checkbox_choice.pt
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
<div tal:define="css_class css_class|field.widget.css_class;
style style|field.widget.style;
oid oid|field.oid;
inline getattr(field.widget, 'inline', False);
manual_focus manual_focus|field.manual_focus"
tal:omit-tag="not inline">
${field.start_sequence()}
<div tal:repeat="choice values | field.widget.values"
tal:omit-tag="inline"
class="checkbox">
<label for="${oid}-${repeat.choice.index}"
tal:define="(value, title) choice"
tal:attributes="class inline and 'checkbox-inline'">
<input tal:attributes="checked value in cstruct;
class css_class;
style style;
data-deform-manual-focus manual_focus"
type="checkbox"
name="checkbox"
value="${value}"
id="${oid}-${repeat.choice.index}"/>
${title}
</label>
</div>
${field.end_sequence()}
</div>