From f65c47a90017f980a527cd1f7f1915c53baffb41 Mon Sep 17 00:00:00 2001 From: Kacper Kubacki Date: Mon, 1 Sep 2025 09:27:27 +0200 Subject: [PATCH] Remove hard coded _token field --- .../templates/catalog_promotion/form.html.twig | 1 - .../Bundle/AdminBundle/templates/channel/form.html.twig | 1 - .../Bundle/AdminBundle/templates/country/form.html.twig | 1 - .../Bundle/AdminBundle/templates/order/form.html.twig | 1 - .../AdminBundle/templates/payment_method/form.html.twig | 1 - .../Bundle/AdminBundle/templates/product/form.html.twig | 1 - .../templates/product/generate_variants/form.html.twig | 1 - .../templates/product_attribute/form.html.twig | 1 - .../AdminBundle/templates/product_option/form.html.twig | 1 - .../AdminBundle/templates/product_variant/form.html.twig | 1 - .../AdminBundle/templates/promotion/form.html.twig | 1 - .../templates/promotion_coupon/generate/form.html.twig | 1 - .../request_password_reset/page/content/form.html.twig | 1 - .../security/reset_password/page/content/form.html.twig | 1 - .../templates/shared/crud/common/content/form.html.twig | 1 - .../AdminBundle/templates/shared/form_theme.html.twig | 9 +++++++++ .../templates/shipment/component/ship.html.twig | 1 - .../AdminBundle/templates/shipping_method/form.html.twig | 1 - .../AdminBundle/templates/taxon/sections/form.html.twig | 1 - .../Bundle/AdminBundle/templates/zone/form.html.twig | 1 - .../account/address_book/common/main/form.html.twig | 1 - .../account/address_book/set_as_default.html.twig | 4 +++- .../change_password/update/content/main/form.html.twig | 1 - .../content/form_container/form.html.twig | 1 - .../profile_update/update/content/main/form.html.twig | 1 - .../templates/account/register/content/form.html.twig | 1 - .../account/reset_password/content/form.html.twig | 1 - .../templates/cart/index/content/form.html.twig | 1 - .../templates/checkout/address/content/form.html.twig | 1 - .../templates/checkout/complete/content/form.html.twig | 1 - .../checkout/select_payment/content/form.html.twig | 1 - .../checkout/select_shipping/content/form.html.twig | 1 - .../contact/contact_request/content/form.html.twig | 1 - .../Bundle/ShopBundle/templates/form/theme.html.twig | 9 +++++++++ .../templates/order/show/content/form.html.twig | 1 - .../show/content/info/summary/add_to_cart.html.twig | 1 - .../product_review/create/content/main/form.html.twig | 1 - 37 files changed, 21 insertions(+), 35 deletions(-) diff --git a/src/Sylius/Bundle/AdminBundle/templates/catalog_promotion/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/catalog_promotion/form.html.twig index 70c22618cf..aafb551e99 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/catalog_promotion/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/catalog_promotion/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/channel/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/channel/form.html.twig index 4005a6d0e2..355bb8b04f 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/channel/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/channel/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} {{ form_end(form, {render_rest: false}) }} diff --git a/src/Sylius/Bundle/AdminBundle/templates/country/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/country/form.html.twig index b0668c0db1..611455477c 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/country/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/country/form.html.twig @@ -6,7 +6,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/order/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/order/form.html.twig index 2a410f4110..e782355446 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/order/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/order/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/payment_method/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/payment_method/form.html.twig index ad4d55ed7c..b2f6db8527 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/payment_method/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/payment_method/form.html.twig @@ -10,7 +10,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/product/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/product/form.html.twig index fa5b5a3b8b..7526bf6911 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/product/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/product/form.html.twig @@ -9,7 +9,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { mapped_product_attributes, diff --git a/src/Sylius/Bundle/AdminBundle/templates/product/generate_variants/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/product/generate_variants/form.html.twig index e4e7394b2a..8cec2bf69f 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/product/generate_variants/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/product/generate_variants/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/product_attribute/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/product_attribute/form.html.twig index b30203bb76..6b86b57916 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/product_attribute/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/product_attribute/form.html.twig @@ -9,7 +9,6 @@ {% if hookable_metadata.configuration.method is defined %} {% endif %} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/product_option/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/product_option/form.html.twig index b23a4ee469..0cf7418ce7 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/product_option/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/product_option/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/product_variant/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/product_variant/form.html.twig index 0f3eb02098..0c30e97642 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/product_variant/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/product_variant/form.html.twig @@ -7,7 +7,6 @@ {% endif %} {{ form_errors(form, sylius_test_form_attribute('form-validation-errors')) }} - {{ form_widget(form._token) }} {% hook 'form' with { form, resource } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/promotion/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/promotion/form.html.twig index 213a880c6c..d40655a853 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/promotion/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/promotion/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/promotion_coupon/generate/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/promotion_coupon/generate/form.html.twig index 7f011b3fb0..8542c9faff 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/promotion_coupon/generate/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/promotion_coupon/generate/form.html.twig @@ -4,7 +4,6 @@ {{ form_start(form, {'attr': {'novalidate': 'novalidate', 'id': form.vars.id}}) }}
{{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %}
diff --git a/src/Sylius/Bundle/AdminBundle/templates/security/request_password_reset/page/content/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/security/request_password_reset/page/content/form.html.twig index d6da99618c..1574a3475b 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/security/request_password_reset/page/content/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/security/request_password_reset/page/content/form.html.twig @@ -4,5 +4,4 @@ {{ form_start(form, {'action': path('sylius_admin_request_password_reset'), 'attr': {'class': 'ui large loadable form', 'novalidate': 'novalidate'}}) }} {% hook 'form' with { form } %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/AdminBundle/templates/security/reset_password/page/content/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/security/reset_password/page/content/form.html.twig index a81e7ffc9c..3bada508b8 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/security/reset_password/page/content/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/security/reset_password/page/content/form.html.twig @@ -4,5 +4,4 @@ {{ form_start(form, {'action': path('sylius_admin_password_reset', {'token': app.request.attributes.get('token')}), 'attr': {'class': 'ui large loadable form', 'novalidate': 'novalidate'}}) }} {% hook 'form' with { form } %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/content/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/content/form.html.twig index a7043a28b1..65457bed27 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/content/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/content/form.html.twig @@ -17,7 +17,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form, resource } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/shared/form_theme.html.twig b/src/Sylius/Bundle/AdminBundle/templates/shared/form_theme.html.twig index 2c30c3b807..a66003052b 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/shared/form_theme.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/shared/form_theme.html.twig @@ -87,3 +87,12 @@ {% set attr = attr|merge({'class': (attr.class|default('') ~ ' btn btn-outline-primary')|trim}) %} {{ parent() }} {%- endblock -%} + +{%- block form_end -%} + {% for child in form %} + {% if 'csrf_token' in child.vars.block_prefixes and child.rendered == false %} + {{ form_row(child) }} + {% endif %} + {% endfor %} + +{%- endblock form_end -%} diff --git a/src/Sylius/Bundle/AdminBundle/templates/shipment/component/ship.html.twig b/src/Sylius/Bundle/AdminBundle/templates/shipment/component/ship.html.twig index 1a6d096f69..110ce0f9ae 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/shipment/component/ship.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/shipment/component/ship.html.twig @@ -16,7 +16,6 @@ {{ 'sylius.ui.ship'|trans }} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} {% endif %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/shipping_method/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/shipping_method/form.html.twig index 1d473a5c83..880470a677 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/shipping_method/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/shipping_method/form.html.twig @@ -9,7 +9,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/taxon/sections/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/taxon/sections/form.html.twig index d2029f93a1..fd440fc7bd 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/taxon/sections/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/taxon/sections/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/AdminBundle/templates/zone/form.html.twig b/src/Sylius/Bundle/AdminBundle/templates/zone/form.html.twig index 0b0f156073..1ede29f8d9 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/zone/form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/zone/form.html.twig @@ -8,7 +8,6 @@ {% endif %} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/address_book/common/main/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/address_book/common/main/form.html.twig index eb8522f271..c2b530a071 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/address_book/common/main/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/address_book/common/main/form.html.twig @@ -10,6 +10,5 @@ {% hook 'form' with { form } %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/address_book/set_as_default.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/address_book/set_as_default.html.twig index 891cbe8d42..5e2c105ae8 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/address_book/set_as_default.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/address_book/set_as_default.html.twig @@ -1,9 +1,11 @@ {% import '@SyliusShop/shared/buttons.html.twig' as buttons %} + +{% form_theme form '@SyliusShop/form/theme.html.twig' %} +
{{ form_start(form, {'action': path('sylius_shop_account_address_book_set_as_default', {'id': hookable_metadata.context.address.id})}) }} {{ buttons.submit('sylius.ui.set_as_default'|trans, 'set-as-default-button', null, 'btn-sm btn-icon btn-outline-gray w-full') }} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }}
diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/change_password/update/content/main/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/change_password/update/content/main/form.html.twig index 61e4382164..d8147ffe4c 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/change_password/update/content/main/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/change_password/update/content/main/form.html.twig @@ -10,6 +10,5 @@ {% hook 'form' with { form } %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/forgotten_password/content/form_container/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/forgotten_password/content/form_container/form.html.twig index 0534e3611e..318fb5a03f 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/forgotten_password/content/form_container/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/forgotten_password/content/form_container/form.html.twig @@ -5,6 +5,5 @@
{{ form_start(form, {'action': path('sylius_shop_request_password_reset_token'), 'attr': {'novalidate': 'novalidate'}}) }} {% hook 'form' %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }}
diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/profile_update/update/content/main/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/profile_update/update/content/main/form.html.twig index 8c94281be3..5897b6eca6 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/profile_update/update/content/main/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/profile_update/update/content/main/form.html.twig @@ -3,7 +3,6 @@
{{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }} {{ form_errors(form) }} - {{ form_row(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/register/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/register/content/form.html.twig index 0294eea50b..8200e58206 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/register/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/register/content/form.html.twig @@ -2,7 +2,6 @@
{{ form_start(form, {'action': path('sylius_shop_register'), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }} - {{ form_row(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/ShopBundle/templates/account/reset_password/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/account/reset_password/content/form.html.twig index 75f12f89a8..a8895f0501 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/account/reset_password/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/account/reset_password/content/form.html.twig @@ -7,5 +7,4 @@ {% hook 'form' %} -{{ form_row(form._token) }} {{ form_end(form, {render_rest: hookable.configuration.render_rest|default(false)}) }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form.html.twig index 0dabcbf52e..31fb247914 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/cart/index/content/form.html.twig @@ -11,7 +11,6 @@ {{ form_start(form, {'action': path('sylius_shop_cart_checkout'), 'attr': {'novalidate': 'novalidate', 'id': form.vars.id}}) }} {{ form_errors(form) }} - {{ form_widget(form._token) }} {% hook 'form' with { form } %} diff --git a/src/Sylius/Bundle/ShopBundle/templates/checkout/address/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/checkout/address/content/form.html.twig index c39abd4d68..e5a18f5469 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/checkout/address/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/checkout/address/content/form.html.twig @@ -9,6 +9,5 @@ {% hook 'form' with { form, order: resource, email_exists: emailExists } %} - {{ form_row(form._token) }} {{ form_end(form, {render_rest: hookable.configuration.render_rest|default(false)}) }}
diff --git a/src/Sylius/Bundle/ShopBundle/templates/checkout/complete/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/checkout/complete/content/form.html.twig index 9d71bc7373..e0844ae9aa 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/checkout/complete/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/checkout/complete/content/form.html.twig @@ -8,5 +8,4 @@ {% hook 'form' %} -{{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/checkout/select_payment/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/checkout/select_payment/content/form.html.twig index 55841614e4..fbc3e4449e 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/checkout/select_payment/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/checkout/select_payment/content/form.html.twig @@ -10,6 +10,5 @@ {% hook 'form' with { form, order: resource } %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }}
diff --git a/src/Sylius/Bundle/ShopBundle/templates/checkout/select_shipping/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/checkout/select_shipping/content/form.html.twig index 1a99ab382d..cb34454f9d 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/checkout/select_shipping/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/checkout/select_shipping/content/form.html.twig @@ -10,6 +10,5 @@ {% hook 'form' %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/contact/contact_request/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/contact/contact_request/content/form.html.twig index 261bce5ca2..89b64ef858 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/contact/contact_request/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/contact/contact_request/content/form.html.twig @@ -2,5 +2,4 @@ {{ form_start(form, {'action': path('sylius_shop_contact_request'), 'attr': {'novalidate': 'novalidate'}}) }} {% hook 'form' %} -{{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/form/theme.html.twig b/src/Sylius/Bundle/ShopBundle/templates/form/theme.html.twig index 9be746a70a..a1409280f9 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/form/theme.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/form/theme.html.twig @@ -73,3 +73,12 @@ {% endfor %} {% endblock %} + +{%- block form_end -%} + {% for child in form %} + {% if 'csrf_token' in child.vars.block_prefixes and child.rendered == false %} + {{ form_row(child) }} + {% endif %} + {% endfor %} + +{%- endblock form_end -%} diff --git a/src/Sylius/Bundle/ShopBundle/templates/order/show/content/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/order/show/content/form.html.twig index f723582edc..8d0618b099 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/order/show/content/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/order/show/content/form.html.twig @@ -12,7 +12,6 @@ {% hook 'form' %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} {% else %} {{ messages.info('sylius.ui.you_can_no_longer_change_payment_method_of_this_order') }} diff --git a/src/Sylius/Bundle/ShopBundle/templates/product/show/content/info/summary/add_to_cart.html.twig b/src/Sylius/Bundle/ShopBundle/templates/product/show/content/info/summary/add_to_cart.html.twig index 7aa028630d..af8ac879ec 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/product/show/content/info/summary/add_to_cart.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/product/show/content/info/summary/add_to_cart.html.twig @@ -15,7 +15,6 @@ {% hook 'add_to_cart' with { product, form } %} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }} {% endif %} diff --git a/src/Sylius/Bundle/ShopBundle/templates/product_review/create/content/main/form.html.twig b/src/Sylius/Bundle/ShopBundle/templates/product_review/create/content/main/form.html.twig index dd64fd6761..31a5fc58f9 100644 --- a/src/Sylius/Bundle/ShopBundle/templates/product_review/create/content/main/form.html.twig +++ b/src/Sylius/Bundle/ShopBundle/templates/product_review/create/content/main/form.html.twig @@ -11,6 +11,5 @@ {{ form_errors(form) }} - {{ form_row(form._token) }} {{ form_end(form, {'render_rest': false}) }}