Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23cc1de

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 d66f082 + 2fc79cf commit 23cc1de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/form/layout.html.twig

Lines changed: 2 additions & 2 deletions
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)