mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Remove left-overs after the old Twig Hooks implementation
This commit is contained in:
parent
e913e9e254
commit
563b1db139
8 changed files with 5 additions and 44 deletions
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{% hook 'billing_address' with { form hookable_metadata.context.form.billingAddress } %}
|
||||
{% hook 'billing_address' with { form, billingAddress: hookable_metadata.context.form.billingAddress } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{% import '@SyliusAdmin/Shared/Helper/money.html.twig' as _money %}
|
||||
|
||||
{% set main_hook = hook_name(hookable_metadata.context.parent_main_hook, 'payments') %}
|
||||
{% set fallback_hook = hook_name(hookable_metadata.context.parent_fallback_hook, 'payments') %}
|
||||
|
||||
{% set order = hookable_metadata.context.resource %}
|
||||
|
||||
<div class="card mb-3">
|
||||
|
|
|
|||
|
|
@ -1,20 +1,11 @@
|
|||
{% 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="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-3 order-lg-1">
|
||||
{% hook [main_hook ~ '#right', fallback_hook ~ '#right'] with hookable_metadata.context|merge({
|
||||
parent_main_hook: main_hook ~ '#right',
|
||||
parent_fallback_hook: fallback_hook ~ '#right',
|
||||
}) %}
|
||||
{% hook 'sections#right' %}
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 order-lg-0">
|
||||
{% hook [main_hook ~ '#left', fallback_hook ~ '#left'] with hookable_metadata.context|merge({
|
||||
parent_main_hook: main_hook ~ '#left',
|
||||
parent_fallback_hook: fallback_hook ~ '#left',
|
||||
}) %}
|
||||
{% hook 'sections#left' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,21 +2,13 @@
|
|||
|
||||
{% form_theme form '@SyliusAdmin/Shared/form_theme.html.twig' %}
|
||||
|
||||
|
||||
{% set main_hook = hook_name(parent_main_hook, 'form') %}
|
||||
{% set fallback_hook = hook_name(parent_fallback_hook, 'form') %}
|
||||
|
||||
<div class="container-xl" {{ attributes }}>
|
||||
{{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
|
||||
<input type="hidden" name="_method" value="PUT" />
|
||||
{{ form_errors(form) }}
|
||||
{{ form_widget(form._token) }}
|
||||
|
||||
{% hook [main_hook, fallback_hook] with {
|
||||
parent_main_hook: main_hook,
|
||||
parent_fallback_hook: fallback_hook,
|
||||
form,
|
||||
} %}
|
||||
{% hook 'form' with { form } %}
|
||||
|
||||
{{ form_end(form, {render_rest: false}) }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,9 @@
|
|||
{% extends '@SyliusAdmin/Shared/Layout/base.html.twig' %}
|
||||
|
||||
{% set fallback_hook = hook_name(_self) %}
|
||||
{% set main_hook = fallback_hook %}
|
||||
|
||||
{% block title %}
|
||||
{{ 'sylius.ui.generate_variants'|trans }} {{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% hook main_hook with {
|
||||
parent_main_hook: main_hook,
|
||||
parent_fallback_hook: fallback_hook,
|
||||
resource,
|
||||
metadata,
|
||||
configuration,
|
||||
form,
|
||||
} %}
|
||||
{% hook 'sylius_admin.product.generate_variants' with { resource, metadata, configuration, form } %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
{% 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 'sections' %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
{% set main_hook = hook_name(hookable_metadata.context.parent_main_hook, 'configuration') %}
|
||||
{% set fallback_hook = hook_name(hookable_metadata.context.parent_fallback_hook, 'configuration') %}
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
{% set main_hook = hook_name(hookable_metadata.context.parent_main_hook, 'rules') %}
|
||||
{% set fallback_hook = hook_name(hookable_metadata.context.parent_fallback_hook, 'rules') %}
|
||||
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<div class="card" {{ sylius_test_html_attribute('rules') }}>
|
||||
<div class="card-header">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue