From 13c4edcc9d17cc66a033c80c83d99ac98148e226 Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Wed, 4 Sep 2024 13:45:55 +0200 Subject: [PATCH] Change background translation path --- src/Form/Type/UiElement/LinksUiElementType.php | 7 ++----- src/Resources/translations/messages.en.yaml | 8 ++++---- src/Resources/translations/messages.fr.yaml | 8 ++++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/Form/Type/UiElement/LinksUiElementType.php b/src/Form/Type/UiElement/LinksUiElementType.php index e50cf63..c0d6ee3 100644 --- a/src/Form/Type/UiElement/LinksUiElementType.php +++ b/src/Form/Type/UiElement/LinksUiElementType.php @@ -56,11 +56,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ->add('background', ChoiceType::class, [ 'label' => 'monsieurbiz_ui_elements.common.fields.background', 'choices' => [ - 'monsieurbiz_ui_elements.ui_element.links_ui_element.fields.background.choices.light' => self::BACKGROUND_LIGHT, - 'monsieurbiz_ui_elements.ui_element.links_ui_element.fields.background.choices.dark' => self::BACKGROUND_DARK, - ], - 'row_attr' => [ - 'class' => 'ui segment', + 'monsieurbiz_ui_elements.common.form_choices.background.light' => self::BACKGROUND_LIGHT, + 'monsieurbiz_ui_elements.common.form_choices.background.dark' => self::BACKGROUND_DARK, ], 'constraints' => [new Assert\NotBlank()], ]) diff --git a/src/Resources/translations/messages.en.yaml b/src/Resources/translations/messages.en.yaml index d0d1f76..f0f78b4 100644 --- a/src/Resources/translations/messages.en.yaml +++ b/src/Resources/translations/messages.en.yaml @@ -18,6 +18,10 @@ monsieurbiz_ui_elements: image_alignment: "Image alignment" image_with_text: "Image with the text" logos: "Logos" + form_choices: + background: + light: "Light" + dark: "Dark" ui_element: hero_ui_element: title: "Hero Element" @@ -26,10 +30,6 @@ monsieurbiz_ui_elements: title: "Links Element" description: "Collection of links" fields: - background: - choices: - light: "Light" - dark: "Dark" alignment: choices: full_width: "Full width" diff --git a/src/Resources/translations/messages.fr.yaml b/src/Resources/translations/messages.fr.yaml index b973b4a..3fdbba2 100644 --- a/src/Resources/translations/messages.fr.yaml +++ b/src/Resources/translations/messages.fr.yaml @@ -18,6 +18,10 @@ monsieurbiz_ui_elements: image_alignment: "Alignement de l'image" image_with_text: "Image accompagnant le texte" logos: "Logos" + form_choices: + background: + light: "Clair" + dark: "Foncé" ui_element: hero_ui_element: title: "Lame Hero" @@ -26,10 +30,6 @@ monsieurbiz_ui_elements: title: "Lame Liens" description: "Ensemble de liens" fields: - background: - choices: - light: "Clair" - dark: "Foncé" alignment: choices: full_width: "Pleine largeur"