Skip to content

Commit

Permalink
Merge pull request #5357 from watarukashii/fix/twig_2_10_deprecated
Browse files Browse the repository at this point in the history
forタグにif条件の追加はTwig2.10で非推奨なので修正
  • Loading branch information
chihiro-adachi authored Apr 20, 2022
2 parents fdf3523 + 85a765f commit 4331d1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,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) %}
<div class="row mb-2">
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/search_items.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
<ul class="list-inline">
{% for child in form.children if child.vars.name != '_token' and child.vars.data is not empty %}
{% for child in form.children|filter(child => (child.vars.name != '_token' and child.vars.data is not empty)) %}
{% if false == (child.vars.label == 'admin.list.sort.key' or child.vars.label == 'admin.list.sort.type') %}{# ソートの選択結果は表示しない #}
<li class="list-inline-item"><span class="font-weight-bold">{{ child.vars.label|trans }}:&nbsp;</span>
{%- if child.vars.data is iterable -%}
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Resource/template/default/Shopping/confirm.twig
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ file that was distributed with this source code.
<div class="ec-select">
<label>{{ 'front.shopping.delivery_provider'|trans }}</label>
{% set delivery_fee = 0 %}
{% for item in shipping.order_items if item.isDeliveryFee %}
{% for item in shipping.order_items|filter(item => item.isDeliveryFee) %}
{% set delivery_fee = item.total_price %}
{% endfor %}
{{ Order.Shippings[idx].Delivery }}({{ delivery_fee|price }})
Expand All @@ -140,7 +140,7 @@ file that was distributed with this source code.
</div>
<div class="ec-blockRadio">
{% set charge = 0 %}
{% for item in Order.order_items if item.isCharge %}
{% for item in Order.order_items|filter(item => item.isCharge) %}
{% set charge = item.total_price %}
{% endfor %}
{{ Order.Payment }}({{ charge|price }})
Expand Down

0 comments on commit 4331d1b

Please sign in to comment.