4c69d120cd
Change-Id: Ie0c439244f1ae3af707b73ef64b1a411c2aede20
14 lines
386 B
Django/Jinja
14 lines
386 B
Django/Jinja
{% macro with_errors(field) -%}
|
|
<div class="control-group{% if field.errors %} error{% endif %}">
|
|
{{ field.label(class_='control-label') }}
|
|
<div class=controls>
|
|
{{ field(**kwargs) }}
|
|
{% if field.errors %}
|
|
{% for error in field.errors %}
|
|
<span class=text-error>{{ error }}</span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{%- endmacro %}
|