appy.gen: first Ploneless version.
This commit is contained in:
parent
5672c81553
commit
d0cbe7e573
360 changed files with 1003 additions and 1017 deletions
42
gen/ui/widgets/boolean.pt
Normal file
42
gen/ui/widgets/boolean.pt
Normal file
|
@ -0,0 +1,42 @@
|
|||
<tal:comment replace="nothing">View macro for a Boolean.</tal:comment>
|
||||
<metal:view define-macro="view">
|
||||
<span tal:replace="value"></span>
|
||||
<input type="hidden" tal:condition="masterCss"
|
||||
tal:attributes="class masterCss; value rawValue; name name; id name"/>
|
||||
</metal:view>
|
||||
|
||||
<tal:comment replace="nothing">Edit macro for an Boolean.</tal:comment>
|
||||
<metal:edit define-macro="edit">
|
||||
<input type="checkbox"
|
||||
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')"/>
|
||||
</metal:edit>
|
||||
|
||||
<tal:comment replace="nothing">Cell macro for an Boolean.</tal:comment>
|
||||
<metal:cell define-macro="cell">
|
||||
<metal:call use-macro="app/ui/widgets/boolean/macros/view"/>
|
||||
</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">
|
||||
<input type="radio" value="True" tal:attributes="name typedWidget; id valueId"/>
|
||||
<label tal:attributes="for valueId" i18n:translate="yes" i18n:domain="plone"></label>
|
||||
</tal:yes>
|
||||
<tal:no define="valueId python:'%s_no' % name">
|
||||
<input type="radio" value="False" tal:attributes="name typedWidget; id valueId"/>
|
||||
<label tal:attributes="for valueId" i18n:translate="no" i18n:domain="plone"></label>
|
||||
</tal:no>
|
||||
<tal:whatever define="valueId python:'%s_whatever' % name">
|
||||
<input type="radio" value="" tal:attributes="name typedWidget; id valueId" checked="checked"/>
|
||||
<label tal:attributes="for valueId" tal:content="python: tool.translate('whatever')"></label>
|
||||
</tal:whatever><br/>
|
||||
</metal:search>
|
Loading…
Add table
Add a link
Reference in a new issue