aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EditEntryType.php2
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewEntryType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/RenameTagType.php35
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/UserInformationType.php9
4 files changed, 45 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
index 08355928..2fc4c204 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
@@ -22,11 +22,13 @@ class EditEntryType extends AbstractType
22 'disabled' => true, 22 'disabled' => true,
23 'required' => false, 23 'required' => false,
24 'label' => 'entry.edit.url_label', 24 'label' => 'entry.edit.url_label',
25 'default_protocol' => null,
25 ]) 26 ])
26 ->add('origin_url', UrlType::class, [ 27 ->add('origin_url', UrlType::class, [
27 'required' => false, 28 'required' => false,
28 'property_path' => 'originUrl', 29 'property_path' => 'originUrl',
29 'label' => 'entry.edit.origin_url_label', 30 'label' => 'entry.edit.origin_url_label',
31 'default_protocol' => null,
30 ]) 32 ])
31 ->add('save', SubmitType::class, [ 33 ->add('save', SubmitType::class, [
32 'label' => 'entry.edit.save_label', 34 'label' => 'entry.edit.save_label',
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
index 7d74fee3..7af1e589 100644
--- a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
@@ -15,6 +15,7 @@ class NewEntryType extends AbstractType
15 ->add('url', UrlType::class, [ 15 ->add('url', UrlType::class, [
16 'required' => true, 16 'required' => true,
17 'label' => 'entry.new.form_new.url_label', 17 'label' => 'entry.new.form_new.url_label',
18 'default_protocol' => null,
18 ]) 19 ])
19 ; 20 ;
20 } 21 }
diff --git a/src/Wallabag/CoreBundle/Form/Type/RenameTagType.php b/src/Wallabag/CoreBundle/Form/Type/RenameTagType.php
new file mode 100644
index 00000000..e6270048
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/RenameTagType.php
@@ -0,0 +1,35 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\TextType;
7use Symfony\Component\Form\FormBuilderInterface;
8use Symfony\Component\OptionsResolver\OptionsResolver;
9
10class RenameTagType extends AbstractType
11{
12 public function buildForm(FormBuilderInterface $builder, array $options)
13 {
14 $builder
15 ->add('label', TextType::class, [
16 'required' => true,
17 'attr' => [
18 'placeholder' => 'tag.rename.placeholder',
19 ],
20 ])
21 ;
22 }
23
24 public function configureOptions(OptionsResolver $resolver)
25 {
26 $resolver->setDefaults([
27 'data_class' => 'Wallabag\CoreBundle\Entity\Tag',
28 ]);
29 }
30
31 public function getBlockPrefix()
32 {
33 return 'tag';
34 }
35}
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
index 07c99949..6e4c9154 100644
--- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
@@ -21,9 +21,14 @@ class UserInformationType extends AbstractType
21 ->add('email', EmailType::class, [ 21 ->add('email', EmailType::class, [
22 'label' => 'config.form_user.email_label', 22 'label' => 'config.form_user.email_label',
23 ]) 23 ])
24 ->add('twoFactorAuthentication', CheckboxType::class, [ 24 ->add('emailTwoFactor', CheckboxType::class, [
25 'required' => false, 25 'required' => false,
26 'label' => 'config.form_user.twoFactorAuthentication_label', 26 'label' => 'config.form_user.emailTwoFactor_label',
27 ])
28 ->add('googleTwoFactor', CheckboxType::class, [
29 'required' => false,
30 'label' => 'config.form_user.googleTwoFactor_label',
31 'mapped' => false,
27 ]) 32 ])
28 ->add('save', SubmitType::class, [ 33 ->add('save', SubmitType::class, [
29 'label' => 'config.form.save', 34 'label' => 'config.form.save',