Hide the custom type input field if not needed to improve the UX

This commit is contained in:
Jan Böhmer 2023-11-16 22:33:31 +01:00
parent 7f612bc371
commit c8bd800b9f
4 changed files with 60 additions and 1 deletions

View file

@ -45,9 +45,16 @@ class PartAssociationType extends AbstractType
'label' => 'part_association.edit.type',
'choice_label' => fn(AssociationType $type) => $type->getTranslationKey(),
'help' => 'part_association.edit.type.help',
'attr' => [
'data-pages--association-edit-type-select-target' => 'select'
]
])
->add('other_type', TextType::class, [
'required' => false,
'label' => 'part_association.edit.other_type',
'row_attr' => [
'data-pages--association-edit-type-select-target' => 'display'
]
])
->add('comment', TextType::class, [
'required' => false,