Skip to content

Commit

Permalink
Start with an empty selection of category when a new part is created,…
Browse files Browse the repository at this point in the history
… so that the user has to manually select it
  • Loading branch information
jbtronics committed Jan 5, 2025
1 parent 3ad0886 commit c9aefdd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Form/Part/PartBaseType.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'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,
Expand Down

0 comments on commit c9aefdd

Please sign in to comment.