Parent: [94433f] (diff)

Child: [36f02a] (diff)

Download this file

forge_form.html    30 lines (29 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<form method="{{method}}"
{% if enctype %}enctype="{{enctype}}"{% endif %}
action="{{action}}">
{% if errors and not errors.iteritems and show_errors %}
<div class="grid-19"><span {{widget.j2_attrs({'class':error_class})}}>{{errors}}</span></div>
{% endif %}
{% for field in widget.fields %}
{% set ctx=widget.context_for(field) %}
{% if field.field_type != 'hidden' %}
{% if ctx.errors and field.show_errors -%}
<div class="grid-19"><span {{widget.j2_attrs({'class':error_class})}}>{{ctx.errors}}</span></div>
{%- endif %}
{% if field.show_label and field.label %}
<label for="{{ctx.id}}" class="grid-4">{{field.label}}:</label>
<div class="grid-15">{{field.display(**ctx)}}</div>
{% else %}
<div class="grid-19">{{field.display(**ctx)}}</div>
{% endif %}
{% else %}
{{field.display(**ctx)}}
{% endif %}
{% endfor %}
<label class="grid-4">&nbsp;</label>
<div class="grid-15">
{% for b in buttons %}
{{b.display()}}
{% endfor %}
</div>
</form>