modif form

This commit is contained in:
ragueneaul 2024-12-20 11:52:49 +01:00
parent b3e3f41003
commit f1f5feb423
5 changed files with 14 additions and 9 deletions

View File

@ -3,8 +3,9 @@
namespace App\Form; namespace App\Form;
use App\Entity\Intervention; use App\Entity\Intervention;
use Doctrine\DBAL\Types\TextType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -14,7 +15,7 @@ class InterventionType extends AbstractType
{ {
$builder $builder
->add('Wording', TextType::class) ->add('Wording', TextType::class)
->add('Timestamp', \DateTime::class, [ ->add('Timestamp', DateType::class, [
'widget' => 'single_text', 'widget' => 'single_text',
]) ])
->add('Description', TextType::class) ->add('Description', TextType::class)

View File

@ -3,8 +3,8 @@
namespace App\Form; namespace App\Form;
use App\Entity\Skill; use App\Entity\Skill;
use Doctrine\DBAL\Types\TextType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,9 +3,9 @@
namespace App\Form; namespace App\Form;
use App\Entity\Stock; use App\Entity\Stock;
use Doctrine\DBAL\Types\IntegerType;
use Doctrine\DBAL\Types\TextType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,8 +3,10 @@
namespace App\Form; namespace App\Form;
use App\Entity\User; use App\Entity\User;
use Doctrine\DBAL\Types\TextType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -16,11 +18,13 @@ class UserType extends AbstractType
->add('email', TextType::class) ->add('email', TextType::class)
->add('FirstName', TextType::class) ->add('FirstName', TextType::class)
->add('LastName', TextType::class) ->add('LastName', TextType::class)
->add('BirthDate', \DateTime::class, [ ->add('BirthDate', DateType::class, [
'widget' => 'single_text', 'widget' => 'single_text',
]) ])
->add('Phone', TextType::class) ->add('Phone', TextType::class)
->add('roles', TextType::class) ->add('roles', ChoiceType::class, [
'multiple' => true,
])
->add('password', TextType::class) ->add('password', TextType::class)
; ;
} }

View File

@ -3,8 +3,8 @@
namespace App\Form; namespace App\Form;
use App\Entity\Vehicle; use App\Entity\Vehicle;
use Doctrine\DBAL\Types\TextType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;