Start using Twig Hooks autoprefixing in the Taxon templates

This commit is contained in:
Jacob Tobiasz 2024-04-25 17:34:23 +02:00
parent 5814a2f18f
commit a550b8d4ef
No known key found for this signature in database
GPG key ID: 3F84290201B006E0
6 changed files with 8 additions and 17 deletions

View file

@ -1 +1 @@
{{ form_row(hookable_data.form.code) }}
{{ form_row(hookable_metadata.context.form.code) }}

View file

@ -1 +1 @@
{{ form_row(hookable_data.form.enabled, { label_attr: { class: 'checkbox-switch' } }) }}
{{ form_row(hookable_metadata.context.form.enabled, { label_attr: { class: 'checkbox-switch' } }) }}

View file

@ -1,4 +1,4 @@
{{ form_row(hookable_data.form.parent, {
{{ form_row(hookable_metadata.context.form.parent, {
parent_label_class: 'checkbox-switch',
search_url: path('sylius_admin_ajax_taxon_by_name_phrase'),
init_load_url: path('sylius_admin_ajax_taxon_by_code')

View file

@ -1,11 +1,5 @@
{% set main_hook = hook_name(hookable_data.parent_main_hook, 'details') %}
{% set fallback_hook = hook_name(hookable_data.parent_fallback_hook, 'details') %}
<div class="card mb-3">
<div class="card-body">
{% hook [main_hook, fallback_hook] with hookable_data|merge({
parent_main_hook: main_hook,
parent_fallback_hook: fallback_hook,
}) %}
{% hook 'details' %}
</div>
</div>

View file

@ -21,5 +21,5 @@
</div>
{% endverbatim %}
{% endset %}
{{ _translations.default(hookable_data.form.translations, body, {accordionId: 'taxon-translations'}) }}
{{ _translations.default(hookable_metadata.context.form.translations, body, {accordionId: 'taxon-translations'}) }}
</div>

View file

@ -1,9 +1,6 @@
{% set main_hook = hook_name(hookable_data.parent_main_hook, 'sections') %}
{% set fallback_hook = hook_name(hookable_data.parent_fallback_hook, 'sections') %}
{% set main_hook = hook_name(hookable_metadata.context.parent_main_hook, 'sections') %}
{% set fallback_hook = hook_name(hookable_metadata.context.parent_fallback_hook, 'sections') %}
<div class="col-12 col-md-8">
{% hook [main_hook, fallback_hook] with hookable_data|merge({
parent_main_hook: main_hook,
parent_fallback_hook: fallback_hook,
}) %}
{% hook 'sections' %}
</div>