From deabd81995b900855e2fd7ea9e837451d03d0139 Mon Sep 17 00:00:00 2001 From: Tomasz Kryszan Date: Tue, 5 Sep 2023 13:03:29 +0200 Subject: [PATCH] Added ibexa-embedded-item-edit class to form --- src/bundle/Templating/Twig/EmbeddedItemEditFormExtension.php | 3 +++ .../Templating/Twig/EmbeddedItemEditFormExtensionTest.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/bundle/Templating/Twig/EmbeddedItemEditFormExtension.php b/src/bundle/Templating/Twig/EmbeddedItemEditFormExtension.php index 2ea759d786..4e00a8aa89 100644 --- a/src/bundle/Templating/Twig/EmbeddedItemEditFormExtension.php +++ b/src/bundle/Templating/Twig/EmbeddedItemEditFormExtension.php @@ -46,6 +46,9 @@ public function renderEmbeddedItemEditForm(): FormView 'embedded_item_edit', [ 'action' => $this->router->generate('ibexa.content.edit'), + 'attr' => [ + 'class' => 'ibexa-embedded-item-edit', + ], ] )->createView(); } diff --git a/tests/bundle/Templating/Twig/EmbeddedItemEditFormExtensionTest.php b/tests/bundle/Templating/Twig/EmbeddedItemEditFormExtensionTest.php index 26656cbe3b..b22d976ff3 100644 --- a/tests/bundle/Templating/Twig/EmbeddedItemEditFormExtensionTest.php +++ b/tests/bundle/Templating/Twig/EmbeddedItemEditFormExtensionTest.php @@ -87,6 +87,9 @@ private function createFormFactory(): FormFactory 'embedded_item_edit', [ 'action' => self::FORM_ACTION, + 'attr' => [ + 'class' => 'ibexa-embedded-item-edit', + ], ] ) ->willReturn($this->createEditForm());