diff --git a/src/Form/InterventionType.php b/src/Form/InterventionType.php index 35c3b56..0e2a08e 100644 --- a/src/Form/InterventionType.php +++ b/src/Form/InterventionType.php @@ -2,12 +2,9 @@ namespace App\Form; -use DateTime; +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\SubmitType; -use Symfony\Component\Form\Extension\Core\Type\TextareaType; -use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -17,18 +14,19 @@ class InterventionType extends AbstractType { $builder ->add('Wording', TextType::class) - ->add('Timestamp', DateType::class) - ->add('description', TextAreaType::class) - ->add('address', TextType::class) + ->add('Timestamp', \DateTime::class, [ + 'widget' => 'single_text', + ]) + ->add('Description', TextType::class) + ->add('Address', TextType::class) ->add('Status', TextType::class) - ->add('save', SubmitType::class) ; } public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ - // Configure your form options here + 'data_class' => Intervention::class, ]); } }