Start using Twig Hooks autoprefixing in the Product Variant templates

This commit is contained in:
Jacob Tobiasz 2024-04-25 17:22:12 +02:00
parent 62f5a336c3
commit 930f38714f
No known key found for this signature in database
GPG key ID: 3F84290201B006E0
2 changed files with 4 additions and 13 deletions

View file

@ -1,24 +1,15 @@
{% set form = hookable_data.form %}
{% set main_hook = hook_name(hookable_data.parent_main_hook, 'form') %}
{% set fallback_hook = hook_name(hookable_data.parent_fallback_hook, 'form') %}
{% form_theme form '@SyliusAdmin/Shared/form_theme.html.twig' %}
<div class="container-xl">
{{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
<div class="row">
{% if hookable_configuration.method is defined %}
<input type="hidden" name="_method" value="{{ hookable_configuration.method }}" />
{% if hookable_metadata.configuration.method is defined %}
<input type="hidden" name="_method" value="{{ hookable_metadata.configuration.method }}" />
{% endif %}
{{ form_errors(form, sylius_test_form_attribute('form-validation-errors')) }}
{{ form_widget(form._token) }}
{% hook [main_hook, fallback_hook] with {
parent_main_hook: main_hook,
parent_fallback_hook: fallback_hook,
resource: hookable_data.resource,
form,
} %}
{% hook 'form' %}
</div>
{{ form_end(form, {render_rest: hookable.configuration.render_rest|default(false)}) }}
</div>

View file

@ -1,6 +1,6 @@
{% import '@SyliusAdmin/Shared/Helper/breadcrumbs.html.twig' as _breadcrumbs %}
{% set configuration = hookable_data.resources.requestConfiguration %}
{% set configuration = hookable_metadata.context.resources.requestConfiguration %}
{% set product = configuration.vars.product %}
{{ _breadcrumbs.default([