From ccaf3a133b3065161620d42a021f056ac7cf45fa Mon Sep 17 00:00:00 2001 From: Tomasz Kryszan Date: Fri, 18 Aug 2023 14:58:22 +0200 Subject: [PATCH] Added html-body component --- .../Resources/config/services/components.yaml | 7 ++++++ .../views/themes/admin/ui/html_body.html.twig | 22 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/bundle/Resources/views/themes/admin/ui/html_body.html.twig diff --git a/src/bundle/Resources/config/services/components.yaml b/src/bundle/Resources/config/services/components.yaml index 6133d6f215..d8cc01704a 100644 --- a/src/bundle/Resources/config/services/components.yaml +++ b/src/bundle/Resources/config/services/components.yaml @@ -39,3 +39,10 @@ services: public: false Ibexa\Contracts\AdminUi\Component\Renderer\RendererInterface: '@Ibexa\AdminUi\Component\Renderer\DefaultRenderer' + + ibexa.adminui.html.body: + parent: Ibexa\AdminUi\Component\TwigComponent + arguments: + $template: '@@ibexadesign/ui/html_body.html.twig' + tags: + - { name: ibexa.admin_ui.component, group: 'html-body' } diff --git a/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig b/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig new file mode 100644 index 0000000000..4e7eec2e56 --- /dev/null +++ b/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig @@ -0,0 +1,22 @@ +
+ {% set form = ibexa_render_embedded_item_edit_form() %} + + {{ form_start(form) }} + {{ form_widget(form.content_info, { 'attr': { + 'hidden': 'hidden', + 'class': 'ibexa-embedded-item-edit__form-field ibexa-embedded-item-edit__form-field--content-info' + } }) }} + {{ form_widget(form.version_info, { 'attr': { + 'hidden': 'hidden', + 'class': 'ibexa-embedded-item-edit__form-field ibexa-embedded-item-edit__form-field--version-info' + } }) }} + {{ form_widget(form.language, { 'attr': { + 'hidden': 'hidden', + 'class': 'ibexa-embedded-item-edit__form-field ibexa-embedded-item-edit__form-field--language' + } }) }} + {{ form_widget(form.location, { 'attr': { + 'hidden': 'hidden', + 'class': 'ibexa-embedded-item-edit__form-field ibexa-embedded-item-edit__form-field--location' + } }) }} + {{ form_end(form) }} +