Start with an empty selection of category when a new part is created, so that the user has to manually select it

This commit is contained in:
Jan Böhmer 2025-01-06 00:29:26 +01:00
parent 3ad088663f
commit c9aefdd862

View file

@ -101,6 +101,8 @@ class PartBaseType extends AbstractType
'dto_value' => $dto?->category,
'label' => 'part.edit.category',
'disable_not_selectable' => true,
//Do not require category for new parts, so that the user must select the category by hand and cannot forget it (the requirement is handled by the constraint in the entity)
'required' => !$new_part,
])
->add('footprint', StructuralEntityType::class, [
'class' => Footprint::class,