##// 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 <div class="checkbox">
2 <input tal:define="name name|field.name;
1 <span tal:define="name name|field.name;
3 2 true_val true_val|field.widget.true_val;
4 3 css_class css_class|field.widget.css_class;
5 4 style style|field.widget.style;
6 oid oid|field.oid"
7 type="checkbox"
8 name="${name}" value="${true_val}"
5 oid oid|field.oid;
6 help_block help_block|field.widget.help_block|'';
7 "
8 tal:omit-tag="">
9
10 <div class="checkbox">
11 <input type="checkbox" name="${name}" value="${true_val}"
9 12 id="${oid}"
10 13 tal:attributes="checked cstruct == true_val;
11 14 class css_class;
12 style style;" />
13
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
@@ -8,11 +8,14 b''
8 8 help_block help_block|field.widget.help_block|'';
9 9 "
10 10 tal:omit-tag="">
11
11 12 <input type="text" name="${name}" value="${cstruct}"
13 id="${oid}"
14 placeholder="${placeholder}"
15
12 16 tal:attributes="class string: form-control ${css_class or ''};
13 17 style style"
14 placeholder="${placeholder}"
15 id="${oid}"/>
18 />
16 19
17 20 <p tal:condition="help_block" class="help-block">${help_block}</p>
18 21 <script tal:condition="mask" type="text/javascript">
@@ -23,4 +26,5 b''
23 26 {placeholder:"${mask_placeholder}"});
24 27 });
25 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