mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-16 10:59:53 +02:00
14 lines
572 B
HTML
14 lines
572 B
HTML
{% macro render_field(field, label_visible=true) -%}
|
|
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
|
{% if field.type != 'HiddenField' and label_visible %}
|
|
<label for="{{ field.id }}" class="control-label">{{ field.label }}</label>
|
|
{% endif %}
|
|
{{ field(class_='form-control', **kwargs) }}
|
|
{% if field.errors %}
|
|
{% for e in field.errors %}
|
|
<p class="help-block">{{ e }}</p>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
{%- endmacro %}
|