##// END OF EJS Templates
form-templates: allow checkboxes to have help block.
marcink -
r2558:572d9909 default
parent child Browse files
Show More
@@ -1,20 +1,26 b''
1 <span tal:define="name name|field.name;
2 true_val true_val|field.widget.true_val;
3 css_class css_class|field.widget.css_class;
4 style style|field.widget.style;
5 oid oid|field.oid;
6 help_block help_block|field.widget.help_block|'';
7 "
8 tal:omit-tag="">
9
1 10 <div class="checkbox">
2 <input tal:define="name name|field.name;
3 true_val true_val|field.widget.true_val;
4 css_class css_class|field.widget.css_class;
5 style style|field.widget.style;
6 oid oid|field.oid"
7 type="checkbox"
8 name="${name}" value="${true_val}"
9 id="${oid}"
10 tal:attributes="checked cstruct == true_val;
11 class css_class;
12 style style;" />
13
11 <input type="checkbox" name="${name}" value="${true_val}"
12 id="${oid}"
13 tal:attributes="checked cstruct == true_val;
14 class css_class;
15 style style;"
16 />
17 <p tal:condition="help_block" class="help-block">${help_block}</p>
14 18 <label for="${field.oid}">
15 19 <span tal:condition="hasattr(field, 'schema') and hasattr(field.schema, 'label')"
16 20 tal:replace="field.schema.label" class="checkbox-label" >
17 21 </span>
18 22
19 23 </label>
20 </div> No newline at end of file
24 </div>
25
26 </span> No newline at end of file
@@ -1,26 +1,30 b''
1 1 <span tal:define="name name|field.name;
2 2 css_class css_class|field.widget.css_class;
3 3 oid oid|field.oid;
4 4 mask mask|field.widget.mask;
5 5 placeholder placeholder|field.widget.placeholder|field.placeholder|'';
6 6 mask_placeholder mask_placeholder|field.widget.mask_placeholder;
7 7 style style|field.widget.style;
8 8 help_block help_block|field.widget.help_block|'';
9 "
9 "
10 10 tal:omit-tag="">
11 <input type="text" name="${name}" value="${cstruct}"
12 tal:attributes="class string: form-control ${css_class or ''};
13 style style"
14 placeholder="${placeholder}"
15 id="${oid}"/>
11
12 <input type="text" name="${name}" value="${cstruct}"
13 id="${oid}"
14 placeholder="${placeholder}"
15
16 tal:attributes="class string: form-control ${css_class or ''};
17 style style"
18 />
16 19
17 <p tal:condition="help_block" class="help-block">${help_block}</p>
18 <script tal:condition="mask" type="text/javascript">
19 deform.addCallback(
20 '${oid}',
21 function (oid) {
22 $("#" + oid).mask("${mask}",
23 {placeholder:"${mask_placeholder}"});
24 });
25 </script>
20 <p tal:condition="help_block" class="help-block">${help_block}</p>
21 <script tal:condition="mask" type="text/javascript">
22 deform.addCallback(
23 '${oid}',
24 function (oid) {
25 $("#" + oid).mask("${mask}",
26 {placeholder:"${mask_placeholder}"});
27 });
28 </script>
29
26 30 </span> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now