Skip to content
41 lines (36 sloc) 1.64 KB
<div
metal:define-macro="widget-wrapper"
i18n:domain="plone"
tal:define="widget nocall:context;
hidden python:widget.mode == 'hidden';
error widget/error;
error_class python:error and ' error' or '';
empty_values python: (None, '', [], ('', '', '', '00', '00', ''), ('', '', ''));
empty_class python: (widget.value in empty_values) and ' empty' or '';
fieldname_class string:kssattr-fieldname-${widget/name};"
data-pat-inlinevalidation='{"type":"z3c.form"}'
tal:attributes="class string:field pat-inlinevalidation ${fieldname_class}${error_class}${empty_class};
data-fieldname widget/name;
id string:formfield-${widget/id};">
<label for="" class="horizontal"
tal:attributes="for widget/id"
tal:condition="not:hidden">
<span i18n:translate="" tal:replace="widget/label">label</span>
<span class="required horizontal" title="Required"
tal:condition="python:widget.required and widget.mode == 'input'"
i18n:attributes="title title_required;">&nbsp;</span>
<span class="formHelp"
tal:define="description widget/field/description"
i18n:translate=""
tal:content="structure description"
tal:condition="python:description and not hidden"
>field description
</span>
</label>
<div class="fieldErrorBox"
tal:content="structure error/render|nothing">
Error
</div>
<input type="text" tal:replace="structure widget/render"
metal:define-slot="widget" />
</div>
Something went wrong with that request. Please try again.