Use error glypchicon in form errors.

This commit is contained in:
Markus 2016-03-22 13:23:10 +01:00
parent 7ba6c86e2d
commit c792b687e0
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,12 @@
{% macro render_field(field) %}
<div class="form-group {% if field.errors %}has-error{% endif %}">{{ field.label(class_="control-label col-sm-3") }}<div class="col-sm-5">{{ field(class_="form-control") }}</div>{% for error in field.errors %}[ {{ error }} ]{% endfor %}</div>
<div class="form-group {% if field.errors %}has-error{% endif %}">{{ field.label(class_="control-label col-sm-3") }}
<div class="col-sm-5">{{ field(class_="form-control") }}</div>
{% for error in field.errors %}
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span>
{{ error }}
{% endfor %}
</div>
{%- endmacro %}
{% macro render_button(button) %}