CPI Ordering System (the old version)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

56 lines
2.4 KiB

<div tal:define="error_class error_class|field.widget.error_class;
description description|field.description;
title title|field.title;
oid oid|field.oid;
hidden hidden|field.widget.hidden;
category category|field.widget.category;
structural hidden or category == 'structural';
required required|'required' if field.required else None;
was_validated True if field.get_root().error else False;
is_invalid is_invalid|field.error and not field.widget.hidden and not field.typ.__class__.__name__=='Mapping';
col_label col_label|field.col_label;
col_input col_input|field.col_input;"
class="form-group form-row ${field.error and 'has-error' or ''} ${field.widget.item_css_class or ''} ${field.default_item_css_class()}"
title="${description}"
id="item-${oid}"
tal:omit-tag="structural"
i18n:domain="deform">
<label for="${oid}"
class="control-label col-${col_label} col-form-label ${required and 'required' or ''}"
tal:condition="not structural"
id="req-${oid}"
>
${title}
</label>
<div class="col-${col_input}">
<div tal:define="input_prepend field.widget.input_prepend | None;
input_append field.widget.input_append | None"
tal:omit-tag="not (input_prepend or input_append)"
class="input-group">
<div class="input-group-prepend" tal:condition="input_prepend">
<div class="input-group-text">${input_prepend}</div>
</div>
<span tal:replace="structure field.serialize(cstruct).strip()"></span>
<div class="input-group-append" tal:condition="input_append">
<div class="input-group-text">${input_append}</div>
</div>
</div>
<div class="invalid-feedback"
tal:define="errstr 'error-%s' % field.oid"
tal:repeat="msg field.error.messages()"
i18n:translate=""
tal:attributes="id repeat.msg.index==0 and errstr or
('%s-%s' % (errstr, repeat.msg.index))"
tal:condition="is_invalid">
${msg}
</div>
<small tal:condition="field.description and not field.widget.hidden"
class="form-text text-muted" >
${field.description}
</small>
</div>
</div>