mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 19:34:54 +02:00
Added constraints for selectable attribute.
This commit is contained in:
parent
408d98c6e1
commit
51be176418
12 changed files with 169 additions and 0 deletions
|
@ -37,6 +37,7 @@ use App\Entity\Base\StructuralDBElement;
|
|||
use FOS\CKEditorBundle\Form\Type\CKEditorType;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ResetType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
|
@ -69,6 +70,10 @@ class BaseEntityAdminForm extends AbstractType
|
|||
'attr' => ['class' => 'selectpicker', 'data-live-search' => true], 'required' => false, 'label' => 'parent.label',
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ])
|
||||
|
||||
->add('not_selectable', CheckboxType::class, ['required' => false,
|
||||
'label' => 'not_selectable.label', 'help' => 'not_selectable.help', 'label_attr'=> ['class' => 'checkbox-custom'],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity) ])
|
||||
|
||||
->add('comment', CKEditorType::class, ['required' => false,
|
||||
'label' => 'comment.label', 'attr' => ['rows' => 4], 'help' => 'bbcode.hint',
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue