sf4, fix twig depreciation with loop for and if condition

This commit is contained in:
Tchama 2020-07-31 12:51:49 +02:00
parent 95cee22a30
commit ed4975b41d
2 changed files with 4 additions and 4 deletions

View File

@ -7,9 +7,9 @@
{{ form_start(form) }} {{ form_start(form) }}
{% block crud_content_form_rows %} {% block crud_content_form_rows %}
{% for f in form if f.vars.name != 'submit' %} {% for f in form %}{% if f.vars.name != 'submit' %}
{{ form_row(f) }} {{ form_row(f) }}
{% endfor %} {% endif %}{% endfor %}
{% endblock crud_content_form_rows %} {% endblock crud_content_form_rows %}
{% block crud_content_form_actions %} {% block crud_content_form_actions %}

View File

@ -26,7 +26,7 @@
<h1>{{ 'Exports list'|trans }}</h1> <h1>{{ 'Exports list'|trans }}</h1>
<div> <div>
{% for group, exports in grouped_exports if group != '_' %} {% for group, exports in grouped_exports %}{% if group != '_' %}
<h2>{{ group }}</h2> <h2>{{ group }}</h2>
<div class="export-list"> <div class="export-list">
@ -43,7 +43,7 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% endfor %} {% endif %}{% endfor %}
{% if grouped_exports|keys|length > 1 %} {% if grouped_exports|keys|length > 1 %}
<h2>{{ 'Ungrouped exports'|trans }}</h2> <h2>{{ 'Ungrouped exports'|trans }}</h2>