X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FNewUserType.php;h=e6fff976647afea3e41c6ed59ffb8d41134d6bb4;hb=619cc45359ead519b64129181a07e14160fbbfcb;hp=8aabc8bbbc40ecffdaabc6543e7a0928678329a9;hpb=516022d60ea5c4e0c18a222590d23190a2c7765f;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 8aabc8bb..e6fff976 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -3,6 +3,10 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\EmailType; +use Symfony\Component\Form\Extension\Core\Type\RepeatedType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Validator\Constraints; @@ -12,8 +16,8 @@ class NewUserType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('username', 'text', array('required' => true)) - ->add('plainPassword', 'repeated', array( + ->add('username', TextType::class, array('required' => true)) + ->add('plainPassword', RepeatedType::class, array( 'type' => 'password', 'constraints' => array( new Constraints\Length(array( @@ -23,8 +27,8 @@ class NewUserType extends AbstractType new Constraints\NotBlank(), ), )) - ->add('email', 'email') - ->add('save', 'submit') + ->add('email', EmailType::class) + ->add('save', SubmitType::class) ; } @@ -35,7 +39,7 @@ class NewUserType extends AbstractType )); } - public function getName() + public function getBlockPrefix() { return 'new_user'; }