Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forタグにif条件の追加はTwig2.10で非推奨なので修正 #4924

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Content/block_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Content/layout.twig
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Content/news_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Content/page_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Customer/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Customer/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in searchForm if f.vars.eccube_form_options.auto_render %}
{% for f in searchForm|filter(f => f.vars.eccube_form_options.auto_render) %}
{# TODO 1項目1行になるのを改善 #}
<div class="row mb-2">
{% if f.vars.eccube_form_options.form_theme %}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Order/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Order/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in searchForm if f.vars.eccube_form_options.auto_render %}
{% for f in searchForm|filter(f => f.vars.eccube_form_options.auto_render) %}
{# TODO 1項目1行になるのを改善 #}
<div class="row mb-2">
{% if f.vars.eccube_form_options.form_theme %}
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Resource/template/admin/Product/category.twig
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down Expand Up @@ -278,7 +278,7 @@ file that was distributed with this source code.
<button class="btn btn-ec-sub action-edit-cancel" type="button">{{ 'admin.common.cancel'|trans }}</button>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in forms[Category.id] if f.vars.eccube_form_options.auto_render %}
{% for f in forms[Category.id]|filter(f => f.vars.eccube_form_options.auto_render) %}
<div class="col-auto align-items-center" style="width:90%; padding-top: 10px;">
<div class="row">
<div class="col-3">
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Product/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in searchForm if f.vars.eccube_form_options.auto_render %}
{% for f in searchForm|filter(f => f.vars.eccube_form_options.auto_render) %}
{# TODO 1項目1行になるのを改善 #}
<div class="row mb-2">
{% if f.vars.eccube_form_options.form_theme %}
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Resource/template/admin/Product/product.twig
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ file that was distributed with this source code.
{% endif %}

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand All @@ -567,7 +567,7 @@ file that was distributed with this source code.
{% endfor %}

{% if has_class == false %}
{% for f in form.class if f.vars.eccube_form_options.auto_render %}
{% for f in form.class|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Resource/template/admin/Product/product_class.twig
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ file that was distributed with this source code.
{% for product_class_form in form.product_classes %}
{# product_class_formはcollection typeなので, 1行目だけ出力する #}
{% if loop.first %}
{% for f in product_class_form if f.vars.eccube_form_options.auto_render %}
{% for f in product_class_form|filter(f => f.vars.eccube_form_options.auto_render) %}
<th class="pt-2 pb-2">{{ f.vars.label|trans }}</th>
{% endfor %}
{% endif %}
Expand Down Expand Up @@ -344,7 +344,7 @@ file that was distributed with this source code.
{{ form_errors(product_class_form.sale_type) }}
</td>
{# エンティティ拡張の自動出力 #}
{% for f in product_class_form if f.vars.eccube_form_options.auto_render %}
{% for f in product_class_form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Resource/template/admin/Product/tag.twig
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down Expand Up @@ -212,7 +212,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in forms[Tag.id] if f.vars.eccube_form_options.auto_render %}
{% for f in forms[Tag.id]|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Setting/Shop/mail.twig
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down Expand Up @@ -352,4 +352,4 @@ file that was distributed with this source code.
</div>
</div>
</form>
{% endblock %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ file that was distributed with this source code.
</div>
</div>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/default/Contact/confirm.twig
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ file that was distributed with this source code.
</dd>
</dl>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/default/Contact/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ file that was distributed with this source code.
</dd>
</dl>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/default/Entry/confirm.twig
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ file that was distributed with this source code.
{{ form_widget(form.user_policy_check, { type: 'hidden'}) }}

{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/default/Entry/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ file that was distributed with this source code.
</dd>
</dl>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/default/Mypage/change.twig
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ file that was distributed with this source code.
</dd>
</dl>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ file that was distributed with this source code.
</dd>
</dl>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ file that was distributed with this source code.
</dd>
</dl>
{# エンティティ拡張の自動出力 #}
{% for f in form if f.vars.eccube_form_options.auto_render %}
{% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
{{ form_row(f) }}
Expand Down
Loading