diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/NewUserType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 14 |
1 files changed, 9 insertions, 5 deletions
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 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 10 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 11 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | use Symfony\Component\Validator\Constraints; | 12 | use Symfony\Component\Validator\Constraints; |
@@ -12,8 +16,8 @@ class NewUserType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 16 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 17 | { |
14 | $builder | 18 | $builder |
15 | ->add('username', 'text', array('required' => true)) | 19 | ->add('username', TextType::class, array('required' => true)) |
16 | ->add('plainPassword', 'repeated', array( | 20 | ->add('plainPassword', RepeatedType::class, array( |
17 | 'type' => 'password', | 21 | 'type' => 'password', |
18 | 'constraints' => array( | 22 | 'constraints' => array( |
19 | new Constraints\Length(array( | 23 | new Constraints\Length(array( |
@@ -23,8 +27,8 @@ class NewUserType extends AbstractType | |||
23 | new Constraints\NotBlank(), | 27 | new Constraints\NotBlank(), |
24 | ), | 28 | ), |
25 | )) | 29 | )) |
26 | ->add('email', 'email') | 30 | ->add('email', EmailType::class) |
27 | ->add('save', 'submit') | 31 | ->add('save', SubmitType::class) |
28 | ; | 32 | ; |
29 | } | 33 | } |
30 | 34 | ||
@@ -35,7 +39,7 @@ class NewUserType extends AbstractType | |||
35 | )); | 39 | )); |
36 | } | 40 | } |
37 | 41 | ||
38 | public function getName() | 42 | public function getBlockPrefix() |
39 | { | 43 | { |
40 | return 'new_user'; | 44 | return 'new_user'; |
41 | } | 45 | } |