diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
4 files changed, 6 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 615b8169..7d05a5d8 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | |||
@@ -19,7 +19,7 @@ class ChangePasswordType extends AbstractType | |||
19 | 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), | 19 | 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), |
20 | )) | 20 | )) |
21 | ->add('new_password', RepeatedType::class, array( | 21 | ->add('new_password', RepeatedType::class, array( |
22 | 'type' => 'password', | 22 | 'type' => PasswordType::class, |
23 | 'invalid_message' => 'The password fields must match.', | 23 | 'invalid_message' => 'The password fields must match.', |
24 | 'required' => true, | 24 | 'required' => true, |
25 | 'first_options' => array('label' => 'New password'), | 25 | 'first_options' => array('label' => 'New password'), |
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 88082a04..a139f2df 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php | |||
@@ -36,7 +36,8 @@ class ConfigType extends AbstractType | |||
36 | )) | 36 | )) |
37 | ->add('items_per_page') | 37 | ->add('items_per_page') |
38 | ->add('language', ChoiceType::class, array( | 38 | ->add('language', ChoiceType::class, array( |
39 | 'choices' => $this->languages, | 39 | 'choices' => array_flip($this->languages), |
40 | 'choices_as_values' => true, | ||
40 | )) | 41 | )) |
41 | ->add('save', SubmitType::class) | 42 | ->add('save', SubmitType::class) |
42 | ; | 43 | ; |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index e6fff976..ffbe9ba2 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php | |||
@@ -4,6 +4,7 @@ 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; | 6 | use Symfony\Component\Form\Extension\Core\Type\EmailType; |
7 | use Symfony\Component\Form\Extension\Core\Type\PasswordType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | 8 | 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\SubmitType; |
9 | use Symfony\Component\Form\Extension\Core\Type\TextType; | 10 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
@@ -18,7 +19,7 @@ class NewUserType extends AbstractType | |||
18 | $builder | 19 | $builder |
19 | ->add('username', TextType::class, array('required' => true)) | 20 | ->add('username', TextType::class, array('required' => true)) |
20 | ->add('plainPassword', RepeatedType::class, array( | 21 | ->add('plainPassword', RepeatedType::class, array( |
21 | 'type' => 'password', | 22 | 'type' => PasswordType::class, |
22 | 'constraints' => array( | 23 | 'constraints' => array( |
23 | new Constraints\Length(array( | 24 | new Constraints\Length(array( |
24 | 'min' => 8, | 25 | 'min' => 8, |
diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php index 296cec9e..5815b8c6 100644 --- a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php +++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php | |||
@@ -19,7 +19,7 @@ class TaggingRuleType extends AbstractType | |||
19 | ; | 19 | ; |
20 | 20 | ||
21 | $tagsField = $builder | 21 | $tagsField = $builder |
22 | ->create('tags', 'text') | 22 | ->create('tags', TextType::class) |
23 | ->addModelTransformer(new StringToListTransformer(',')); | 23 | ->addModelTransformer(new StringToListTransformer(',')); |
24 | 24 | ||
25 | $builder->add($tagsField); | 25 | $builder->add($tagsField); |