Improved the association edit panel

This commit is contained in:
Jan Böhmer 2023-11-13 23:01:59 +01:00
parent 8ab9cf1417
commit 81f8b365e9
5 changed files with 70 additions and 1 deletions

View file

@ -37,12 +37,18 @@ class PartAssociationType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('other', PartSelectType::class, [
'label' => 'part_association.edit.other_part',
])
->add('type', EnumType::class, [
'class' => AssociationType::class,
'label' => 'part_association.edit.type',
'choice_label' => fn(AssociationType $type) => $type->getTranslationKey(),
'help' => 'part_association.edit.type.help',
])
->add('other', PartSelectType::class)
->add('comment', TextType::class, [
'required' => false,
'label' => 'part_association.edit.comment'
])
;