mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-17 17:42:28 +02:00
Allow to specify which label profiles are shown in dropdown.
This commit is contained in:
parent
3804e2534d
commit
8b372a3443
8 changed files with 64 additions and 80 deletions
|
@ -24,6 +24,7 @@ namespace App\Form\AdminPages;
|
|||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\LabelSystem\LabelProfile;
|
||||
use App\Form\LabelOptionsType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
|
@ -31,6 +32,14 @@ class LabelProfileAdminForm extends BaseEntityAdminForm
|
|||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
|
||||
$builder->add('show_in_dropdown', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label' => 'label_profile.showInDropdown',
|
||||
'label_attr' => [
|
||||
'class' => 'checkbox-custom',
|
||||
],
|
||||
]);
|
||||
$builder->add('options', LabelOptionsType::class);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue