Merge remote-tracking branch 'origin/upgrade-sf3' into upgrade-sf3

This commit is contained in:
2018-04-16 12:04:06 +02:00
3 changed files with 9 additions and 5 deletions

View File

@@ -23,6 +23,9 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Chill\MainBundle\Form\Type\PostalCodeType;
/**
* A type to create/update Address entity
@@ -46,9 +49,9 @@ class AddressType extends AbstractType
'placeholder' => 'Choose a postal code',
'required' => true
))
->add('validFrom', 'date', array(
'required' => true,
'widget' => 'single_text',
->add('validFrom', DateType::class, array(
'required' => true,
'widget' => 'single_text',
'format' => 'dd-MM-yyyy'
)
)

View File

@@ -21,7 +21,7 @@ class UserType extends AbstractType
->add('username')
;
if ($options['is_creation']) {
$builder->add('plainPassword', new UserPasswordType(), array(
$builder->add('plainPassword', UserPasswordType::class, array(
'mapped' => false
));