aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-03-09 08:59:08 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-03-20 21:12:22 +0100
commit0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc (patch)
tree4cf8b97ed3c06def270e9172c7b17c5c86048585 /src/Wallabag/CoreBundle/Form/Type/NewUserType.php
parentd2b4f01d7435e8a8f99b15a2487916427c04e58d (diff)
downloadwallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.gz
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.zst
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.zip
Convert english translation file
- convert english translation to translate key - remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material) - fix tests about text in response (now checking translation key instead of translated text) - remove all ugly `<div class="hidden">{{ form_rest(form) }}</div>`
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/NewUserType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewUserType.php22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
index 6eb0e63f..60fcc20c 100644
--- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
@@ -17,22 +17,30 @@ class NewUserType extends AbstractType
17 public function buildForm(FormBuilderInterface $builder, array $options) 17 public function buildForm(FormBuilderInterface $builder, array $options)
18 { 18 {
19 $builder 19 $builder
20 ->add('username', TextType::class, array('required' => true)) 20 ->add('username', TextType::class, array(
21 'required' => true,
22 'label' => 'config.form_new_user.username_label',
23 ))
21 ->add('plainPassword', RepeatedType::class, array( 24 ->add('plainPassword', RepeatedType::class, array(
22 'type' => PasswordType::class, 25 'type' => PasswordType::class,
23 'invalid_message' => 'The password fields must match', 26 'invalid_message' => 'validator.password_must_match',
24 'first_options' => array('label' => 'Password'), 27 'first_options' => array('label' => 'config.form_new_user.password_label'),
25 'second_options' => array('label' => 'Repeat new password'), 28 'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'),
26 'constraints' => array( 29 'constraints' => array(
27 new Constraints\Length(array( 30 new Constraints\Length(array(
28 'min' => 8, 31 'min' => 8,
29 'minMessage' => 'Password should by at least 8 chars long', 32 'minMessage' => 'validator.password_too_short',
30 )), 33 )),
31 new Constraints\NotBlank(), 34 new Constraints\NotBlank(),
32 ), 35 ),
36 'label' => 'config.form_new_user.plain_password_label',
37 ))
38 ->add('email', EmailType::class, array(
39 'label' => 'config.form_new_user.email_label',
40 ))
41 ->add('save', SubmitType::class, array(
42 'label' => 'config.form.save',
33 )) 43 ))
34 ->add('email', EmailType::class)
35 ->add('save', SubmitType::class)
36 ; 44 ;
37 } 45 }
38 46