diff --git a/src/Form/InterventionType.php b/src/Form/InterventionType.php index 0e2a08e..26cf5a2 100644 --- a/src/Form/InterventionType.php +++ b/src/Form/InterventionType.php @@ -3,8 +3,9 @@ namespace App\Form; use App\Entity\Intervention; -use Doctrine\DBAL\Types\TextType; 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\OptionsResolver\OptionsResolver; @@ -14,7 +15,7 @@ class InterventionType extends AbstractType { $builder ->add('Wording', TextType::class) - ->add('Timestamp', \DateTime::class, [ + ->add('Timestamp', DateType::class, [ 'widget' => 'single_text', ]) ->add('Description', TextType::class) diff --git a/src/Form/SkillType.php b/src/Form/SkillType.php index 91c8164..8167871 100644 --- a/src/Form/SkillType.php +++ b/src/Form/SkillType.php @@ -3,8 +3,8 @@ namespace App\Form; use App\Entity\Skill; -use Doctrine\DBAL\Types\TextType; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/StockType.php b/src/Form/StockType.php index ce3c486..1cc0e1a 100644 --- a/src/Form/StockType.php +++ b/src/Form/StockType.php @@ -3,9 +3,9 @@ namespace App\Form; use App\Entity\Stock; -use Doctrine\DBAL\Types\IntegerType; -use Doctrine\DBAL\Types\TextType; 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\OptionsResolver\OptionsResolver; diff --git a/src/Form/UserType.php b/src/Form/UserType.php index 6728110..a3278f1 100644 --- a/src/Form/UserType.php +++ b/src/Form/UserType.php @@ -3,8 +3,10 @@ namespace App\Form; use App\Entity\User; -use Doctrine\DBAL\Types\TextType; 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\OptionsResolver\OptionsResolver; @@ -16,11 +18,13 @@ class UserType extends AbstractType ->add('email', TextType::class) ->add('FirstName', TextType::class) ->add('LastName', TextType::class) - ->add('BirthDate', \DateTime::class, [ + ->add('BirthDate', DateType::class, [ 'widget' => 'single_text', ]) ->add('Phone', TextType::class) - ->add('roles', TextType::class) + ->add('roles', ChoiceType::class, [ + 'multiple' => true, + ]) ->add('password', TextType::class) ; } diff --git a/src/Form/VehicleType.php b/src/Form/VehicleType.php index 5571267..f8c69df 100644 --- a/src/Form/VehicleType.php +++ b/src/Form/VehicleType.php @@ -3,8 +3,8 @@ namespace App\Form; use App\Entity\Vehicle; -use Doctrine\DBAL\Types\TextType; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver;