Skip to content

Commit 5259ad7

Browse files
committed
bug #726 Use rootform test to check by root form view (yceruto)
This PR was merged into the master branch. Discussion ---------- Use rootform test to check by root form view This is consistent with the latest changes in the form themes and avoids any future collision between form view properties and form fields. See symfony/symfony#25236 Commits ------- bb11ddf Use rootform test to check by root form view
2 parents 66a449a + bb11ddf commit 5259ad7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/form/layout.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
{% block form_errors -%}
66
{% if errors|length > 0 -%}
7-
{% if form.parent %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
7+
{% if form is not rootform %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
88
<ul class="list-unstyled">
99
{%- for error in errors -%}
1010
{# use font-awesome icon library #}
1111
<li><span class="fa fa-exclamation-triangle"></span> {{ error.message }}</li>
1212
{%- endfor -%}
1313
</ul>
14-
{% if form.parent %}</span>{% else %}</div>{% endif %}
14+
{% if form is not rootform %}</span>{% else %}</div>{% endif %}
1515
{%- endif %}
1616
{%- endblock form_errors %}

0 commit comments

Comments
 (0)