form-templates: added readonly checkbox template
This commit is contained in:
parent
41dbdd78a4
commit
79ef96aa2d
1 changed files with 27 additions and 0 deletions
27
rhodecode/templates/forms/readonly/checkbox.pt
Normal file
27
rhodecode/templates/forms/readonly/checkbox.pt
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<span 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;
|
||||
help_block help_block|field.widget.help_block|'';
|
||||
"
|
||||
tal:omit-tag="">
|
||||
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" name="${name}" value="${true_val}"
|
||||
readonly="readonly" disabled="disabled"
|
||||
id="${oid}"
|
||||
tal:attributes="checked cstruct == true_val;
|
||||
class css_class;
|
||||
style style;"
|
||||
/>
|
||||
<p tal:condition="help_block" class="help-block">${help_block}</p>
|
||||
<label for="${field.oid}">
|
||||
<span tal:condition="hasattr(field, 'schema') and hasattr(field.schema, 'label')"
|
||||
tal:replace="field.schema.label" class="checkbox-label" >
|
||||
</span>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</span>
|
||||
Loading…
Add table
Add a link
Reference in a new issue