diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 00000000..7410251a --- /dev/null +++ b/UPGRADE.md @@ -0,0 +1,21 @@ +# UPGRADE + +## Unreleased + +### BootstrapAdminUi + +* The create/update content composition gained a `body` hookable that renders + the Tabler `.page-body` wrapper. The `form_error_alert` and `form` hookables + moved inside it: + + | Before | After | + |---|---| + | `sylius_admin.common.create.content.form_error_alert` | `sylius_admin.common.create.content.body.form_error_alert` | + | `sylius_admin.common.create.content.form` | `sylius_admin.common.create.content.body.form` | + | `sylius_admin.common.update.content.form_error_alert` | `sylius_admin.common.update.content.body.form_error_alert` | + | `sylius_admin.common.update.content.form` | `sylius_admin.common.update.content.body.form` | + + Hook configuration and templates targeting these hookables or their children + (e.g. `…content.form.sections.general`) must be retargeted accordingly. Apps + that overrode `shared/crud/common/content/form.html.twig` to add the missing + `.page-body` themselves should drop that override to avoid double wrapping. diff --git a/src/BootstrapAdminUi/config/app/twig_hooks/common/create.php b/src/BootstrapAdminUi/config/app/twig_hooks/common/create.php index 7ebb509e..e06ab16b 100644 --- a/src/BootstrapAdminUi/config/app/twig_hooks/common/create.php +++ b/src/BootstrapAdminUi/config/app/twig_hooks/common/create.php @@ -54,6 +54,12 @@ 'header' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/header.html.twig', ], + 'body' => [ + 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/body.html.twig', + ], + ], + + 'sylius_admin.common.create.content.body' => [ 'form_error_alert' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form_error_alert.html.twig', ], @@ -89,19 +95,19 @@ ], ], - 'sylius_admin.common.create.content.form' => [ + 'sylius_admin.common.create.content.body.form' => [ 'sections' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form/sections.html.twig', ], ], - 'sylius_admin.common.create.content.form.sections' => [ + 'sylius_admin.common.create.content.body.form.sections' => [ 'general' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form/sections/general.html.twig', ], ], - 'sylius_admin.common.create.content.form.sections.general' => [ + 'sylius_admin.common.create.content.body.form.sections.general' => [ 'default' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form/sections/general/default.html.twig', ], diff --git a/src/BootstrapAdminUi/config/app/twig_hooks/common/update.php b/src/BootstrapAdminUi/config/app/twig_hooks/common/update.php index efa2a238..f5380fa5 100644 --- a/src/BootstrapAdminUi/config/app/twig_hooks/common/update.php +++ b/src/BootstrapAdminUi/config/app/twig_hooks/common/update.php @@ -54,6 +54,12 @@ 'header' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/header.html.twig', ], + 'body' => [ + 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/body.html.twig', + ], + ], + + 'sylius_admin.common.update.content.body' => [ 'form_error_alert' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form_error_alert.html.twig', ], @@ -91,19 +97,19 @@ ], ], - 'sylius_admin.common.update.content.form' => [ + 'sylius_admin.common.update.content.body.form' => [ 'sections' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form/sections.html.twig', ], ], - 'sylius_admin.common.update.content.form.sections' => [ + 'sylius_admin.common.update.content.body.form.sections' => [ 'general' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form/sections/general.html.twig', ], ], - 'sylius_admin.common.update.content.form.sections.general' => [ + 'sylius_admin.common.update.content.body.form.sections.general' => [ 'default' => [ 'template' => '@SyliusBootstrapAdminUi/shared/crud/common/content/form/sections/general/default.html.twig', ], diff --git a/src/BootstrapAdminUi/templates/shared/crud/common/content/body.html.twig b/src/BootstrapAdminUi/templates/shared/crud/common/content/body.html.twig new file mode 100644 index 00000000..424891ab --- /dev/null +++ b/src/BootstrapAdminUi/templates/shared/crud/common/content/body.html.twig @@ -0,0 +1,3 @@ +