mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Start using Twig Hooks autoprefixing in the Product Variant templates
This commit is contained in:
parent
62f5a336c3
commit
930f38714f
2 changed files with 4 additions and 13 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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([
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue