mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-11 05:29:30 +00:00
Made the form more beautiful and space saving
This commit is contained in:
parent
1ec34a2bb0
commit
88d34447aa
3 changed files with 74 additions and 25 deletions
|
|
@ -48,16 +48,24 @@ class DataSourceSynonymRowType extends AbstractType
|
|||
{
|
||||
$builder
|
||||
->add('dataSource', ChoiceType::class, [
|
||||
'label' => 'settings.behavior.data_source_synonyms.row_type.form.datasource',
|
||||
//'label' => 'settings.behavior.data_source_synonyms.row_type.form.datasource',
|
||||
'label' => false,
|
||||
'choices' => $this->buildDataSourceChoices($options['data_sources']),
|
||||
'required' => true,
|
||||
'row_attr' => [
|
||||
'class' => 'form-floating',
|
||||
],
|
||||
'constraints' => [
|
||||
new Assert\NotBlank(),
|
||||
],
|
||||
])
|
||||
->add('locale', LocaleType::class, [
|
||||
'label' => 'settings.behavior.data_source_synonyms.row_type.form.locale',
|
||||
//'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,14 +81,26 @@ class DataSourceSynonymRowType extends AbstractType
|
|||
'constraints' => [
|
||||
new Assert\NotBlank(),
|
||||
],
|
||||
'row_attr' => [
|
||||
'class' => 'form-floating',
|
||||
],
|
||||
'attr' => [
|
||||
'placeholder' => '' // to show floating label even when empty
|
||||
]
|
||||
])
|
||||
->add('translation_plural', TextType::class, [
|
||||
'label' => 'settings.behavior.data_source_synonyms.row_type.form.translation_plural',
|
||||
'row_attr' => [
|
||||
'class' => 'form-floating',
|
||||
],
|
||||
'required' => true,
|
||||
'empty_data' => '',
|
||||
'constraints' => [
|
||||
new Assert\NotBlank(),
|
||||
],
|
||||
'attr' => [
|
||||
'placeholder' => '' // to show floating label even when empty
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue