From 4d6e818e406417295298e76529ef761ddd8b1385 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 15 Apr 2015 16:50:20 +0200 Subject: [PATCH 1/2] changed email fields with the email type and added required parameter on some stuff --- src/Wallabag/CoreBundle/Form/Type/EntryType.php | 2 +- src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php | 1 + src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 4 ++-- src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryType.php b/src/Wallabag/CoreBundle/Form/Type/EntryType.php index cfd644735..9a64def5f 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryType.php @@ -10,7 +10,7 @@ class EntryType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('url', 'url') + ->add('url', 'url', array('required' => true)) ->add('save', 'submit') ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php index c278b84fa..4cc16a501 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php @@ -20,6 +20,7 @@ class ForgotPasswordType extends AbstractType { $builder ->add('email', 'email', array( + 'required' => true, 'constraints' => array( new Constraints\Email(), new Constraints\NotBlank(), diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 313a9aae8..b7ebe8c24 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -11,7 +11,7 @@ class NewUserType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('username', 'text') + ->add('username', 'text', array('required' => true)) ->add('password', 'password', array( 'constraints' => array( new Constraints\Length(array( @@ -21,7 +21,7 @@ class NewUserType extends AbstractType new Constraints\NotBlank(), ), )) - ->add('email', 'text') + ->add('email', 'email') ->add('save', 'submit') ; } diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index 617722dbf..8fead9a18 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -10,8 +10,8 @@ class UserInformationType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('name', 'text') - ->add('email', 'text') + ->add('name', 'text', array('required' => true)) + ->add('email', 'email') ->add('save', 'submit') ; } From c7d3bf1671fbd2f69d58394e6478e7c532f1f6e4 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 15 Apr 2015 17:19:37 +0200 Subject: [PATCH 2/2] name not required --- src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index 8fead9a18..3d6df5101 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -10,7 +10,7 @@ class UserInformationType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('name', 'text', array('required' => true)) + ->add('name', 'text') ->add('email', 'email') ->add('save', 'submit') ;