Commit e53b1818 authored by Julien Minet's avatar Julien Minet

fix deprecations: use fqcn

parent 678386ff
Pipeline #45857 failed with stages
in 1 minute and 2 seconds
......@@ -10,6 +10,7 @@ use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
class AccompanyingPeriodType extends AbstractType
{
......@@ -22,7 +23,7 @@ class AccompanyingPeriodType extends AbstractType
//if the period_action is close, date opening should not be seen
if ($options['period_action'] !== 'close') {
$builder
->add('openingDate', 'date', array(
->add('openingDate', DateType::class, array(
"required" => true,
'widget' => 'single_text',
'format' => 'dd-MM-yyyy'
......@@ -45,7 +46,7 @@ class AccompanyingPeriodType extends AbstractType
OR
($options['period_action'] === 'update' AND !$accompanyingPeriod->isOpen())
) {
$form->add('closingDate', 'date', array('required' => true,
$form->add('closingDate', DateType::class, array('required' => true,
'widget' => 'single_text', 'format' => 'dd-MM-yyyy'));
$form->add('closingMotive', 'closing_motive');
}
......
......@@ -26,6 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Chill\PersonBundle\Form\Type\GenderType;
use Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer;
......@@ -85,12 +86,12 @@ class CreationPersonType extends AbstractType
$builder
->add('firstName')
->add('lastName')
->add('birthdate', 'date', array('required' => false,
->add('birthdate', DateType::class, array('required' => false,
'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
->add('gender', new GenderType(), array(
'required' => true, 'empty_value' => null
))
->add('creation_date', 'date', array(
->add('creation_date', DateType::class, array(
'required' => true,
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
......
......@@ -26,6 +26,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Chill\PersonBundle\Form\Type\GenderType;
use Chill\MainBundle\Form\Type\Select2CountryType;
......@@ -62,7 +63,7 @@ class PersonType extends AbstractType
$builder
->add('firstName')
->add('lastName')
->add('birthdate', 'date', array('required' => false, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
->add('birthdate', DateType::class, array('required' => false, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
->add('gender', new GenderType(), array(
'required' => true
))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment