Skip to content

Commit

Permalink
Use rootform test to check by root form view
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Dec 5, 2017
1 parent 66a449a commit bb11ddf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/form/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

{% block form_errors -%}
{% if errors|length > 0 -%}
{% if form.parent %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
{% 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.parent %}</span>{% else %}</div>{% endif %}
{% if form is not rootform %}</span>{% else %}</div>{% endif %}
{%- endif %}
{%- endblock form_errors %}

0 comments on commit bb11ddf

Please sign in to comment.