start_sf5_project_reboot/app/templates/form/layout.html.twig

17 lines
596 B
Twig

{% extends 'bootstrap_3_layout.html.twig' %}
{# Errors #}
{% block form_errors -%}
{% if errors|length > 0 -%}
{% if form is not rootform %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
<ul class="list-unstyled">
{%- for error in errors -%}
{# use font-awesome icon library #}
<li><span class="fa fa-exclamation-triangle"></span> {{ error.message }}</li>
{%- endfor -%}
</ul>
{% if form is not rootform %}</span>{% else %}</div>{% endif %}
{%- endif %}
{%- endblock form_errors %}