Fixed: [scope] api, picker and admin form consider 'active' property

* add active field in admin scope form
* issue: https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/675
This commit is contained in:
2022-12-12 19:25:51 +01:00
parent 52512e45fc
commit 1eb1e2ec24
3 changed files with 25 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Form;
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -21,7 +22,13 @@ class ScopeType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TranslatableStringFormType::class);
->add('name', TranslatableStringFormType::class)
->add('active', ChoiceType::class, [
'choices' => [
'Active' => true,
'Inactive' => false,
]])
;
}
/**