2010-08-05 11:23:17 -05:00
|
|
|
<tal:comment replace="nothing">View macro for a Boolean.</tal:comment>
|
2010-10-22 09:06:27 -05:00
|
|
|
<metal:view define-macro="view">
|
2011-11-10 14:59:02 -06:00
|
|
|
<span tal:replace="value"></span>
|
|
|
|
<input type="hidden" tal:condition="masterCss"
|
|
|
|
tal:attributes="class masterCss; value rawValue; name name; id name"/>
|
2010-10-22 09:06:27 -05:00
|
|
|
</metal:view>
|
2010-08-05 11:23:17 -05:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">Edit macro for an Boolean.</tal:comment>
|
|
|
|
<metal:edit define-macro="edit">
|
|
|
|
<input type="checkbox"
|
2011-11-03 10:14:23 -05:00
|
|
|
tal:attributes="name python: name + '_visible'; id name;
|
|
|
|
checked python:contextObj.checkboxChecked(name, rawValue);
|
|
|
|
onClick python:'toggleCheckbox(\'%s\', \'%s_hidden\');;updateSlaves(this)' % (name, name);
|
|
|
|
class masterCss"/>
|
|
|
|
<input type="hidden"
|
|
|
|
tal:attributes="name name;
|
|
|
|
id string:${name}_hidden;
|
|
|
|
value python: test(contextObj.checkboxChecked(name, rawValue), 'True', 'False')"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
</metal:edit>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Cell macro for an Boolean.</tal:comment>
|
|
|
|
<metal:cell define-macro="cell">
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:call use-macro="app/ui/widgets/boolean/macros/view"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
</metal:cell>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Search macro for an Boolean.</tal:comment>
|
|
|
|
<metal:search define-macro="search"
|
|
|
|
tal:define="typedWidget python:'%s*bool' % widgetName">
|
|
|
|
<label tal:attributes="for widgetName" tal:content="python: tool.translate(widget['labelId'])"></label><br>
|
|
|
|
<tal:yes define="valueId python:'%s_yes' % name">
|
2011-10-04 13:12:58 -05:00
|
|
|
<input type="radio" value="True" tal:attributes="name typedWidget; id valueId"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
<label tal:attributes="for valueId" i18n:translate="yes" i18n:domain="plone"></label>
|
|
|
|
</tal:yes>
|
|
|
|
<tal:no define="valueId python:'%s_no' % name">
|
2011-10-04 13:12:58 -05:00
|
|
|
<input type="radio" value="False" tal:attributes="name typedWidget; id valueId"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
<label tal:attributes="for valueId" i18n:translate="no" i18n:domain="plone"></label>
|
|
|
|
</tal:no>
|
|
|
|
<tal:whatever define="valueId python:'%s_whatever' % name">
|
2011-10-04 13:12:58 -05:00
|
|
|
<input type="radio" value="" tal:attributes="name typedWidget; id valueId" checked="checked"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
<label tal:attributes="for valueId" tal:content="python: tool.translate('whatever')"></label>
|
|
|
|
</tal:whatever><br/>
|
|
|
|
</metal:search>
|