diff --git a/src/Form/Type/DataSourceSynonymRowType.php b/src/Form/Type/DataSourceSynonymRowType.php index 445d5c4e..abef12de 100644 --- a/src/Form/Type/DataSourceSynonymRowType.php +++ b/src/Form/Type/DataSourceSynonymRowType.php @@ -52,20 +52,16 @@ class DataSourceSynonymRowType extends AbstractType 'label' => false, 'choices' => $this->buildDataSourceChoices($options['data_sources']), 'required' => true, - 'row_attr' => [ - 'class' => 'form-floating', - ], 'constraints' => [ new Assert\NotBlank(), ], + 'row_attr' => ['class' => 'mb-0'], + 'attr' => ['class' => 'form-select-sm'] ]) ->add('locale', LocaleType::class, [ //'label' => 'settings.behavior.data_source_synonyms.row_type.form.locale', 'label' => false, 'required' => true, - 'row_attr' => [ - 'class' => 'form-floating', - ], // Restrict to languages configured in the language menu: disable ChoiceLoader and provide explicit choices 'choice_loader' => null, 'choices' => $this->buildLocaleChoices(true), @@ -73,34 +69,30 @@ class DataSourceSynonymRowType extends AbstractType 'constraints' => [ new Assert\NotBlank(), ], + 'row_attr' => ['class' => 'mb-0'], + 'attr' => ['class' => 'form-select-sm'] ]) ->add('translation_singular', TextType::class, [ - 'label' => 'settings.behavior.data_source_synonyms.row_type.form.translation_singular', + //'label' => 'settings.behavior.data_source_synonyms.row_type.form.translation_singular', + 'label' => false, 'required' => true, 'empty_data' => '', 'constraints' => [ new Assert\NotBlank(), ], - 'row_attr' => [ - 'class' => 'form-floating', - ], - 'attr' => [ - 'placeholder' => '' // to show floating label even when empty - ] + 'row_attr' => ['class' => 'mb-0'], + 'attr' => ['class' => 'form-select-sm'] ]) ->add('translation_plural', TextType::class, [ - 'label' => 'settings.behavior.data_source_synonyms.row_type.form.translation_plural', - 'row_attr' => [ - 'class' => 'form-floating', - ], + //'label' => 'settings.behavior.data_source_synonyms.row_type.form.translation_plural', + 'label' => false, 'required' => true, 'empty_data' => '', 'constraints' => [ new Assert\NotBlank(), ], - 'attr' => [ - 'placeholder' => '' // to show floating label even when empty - ] + 'row_attr' => ['class' => 'mb-0'], + 'attr' => ['class' => 'form-select-sm'] ]); } diff --git a/templates/form/datasource_synonyms_collection.html.twig b/templates/form/datasource_synonyms_collection.html.twig index 0c81a54e..27c4a051 100644 --- a/templates/form/datasource_synonyms_collection.html.twig +++ b/templates/form/datasource_synonyms_collection.html.twig @@ -7,7 +7,7 @@
{{ form_row(child.translation_singular) }}
{{ form_row(child.translation_plural) }}
-
@@ -39,6 +39,14 @@ }) }} {{ block('widget_container_attributes')|raw }}{% for k,v in _attrs %} {{ k }}="{{ v }}"{% endfor %} > +
+
{% trans %}settings.behavior.data_source_synonyms.row_type.form.datasource{% endtrans %}
+
{% trans %}settings.behavior.data_source_synonyms.row_type.form.locale{% endtrans %}
+
{% trans %}settings.behavior.data_source_synonyms.row_type.form.translation_singular{% endtrans %}
+
{% trans %}settings.behavior.data_source_synonyms.row_type.form.translation_plural{% endtrans %}
+
+
+
{% for child in form %} {{ _self.renderForm(child) }}