From a664a1d876174e9d61d8324039ee86d2b6bf164d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20HULARD?= Date: Tue, 23 Jan 2018 19:09:03 +0100 Subject: Rename Tag : Add a new FormType --- .../CoreBundle/Form/Type/RenameTagType.php | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Form/Type/RenameTagType.php (limited to 'src/Wallabag/CoreBundle/Form') 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 @@ +add('label', TextType::class, [ + 'required' => true, + 'attr' => [ + 'placeholder' => 'tag.rename.placeholder', + ], + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'Wallabag\CoreBundle\Entity\Tag', + ]); + } + + public function getBlockPrefix() + { + return 'tag'; + } +} -- cgit v1.2.3 From a6b242a1fd6f8900d80354361449f1bf62506ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 2 Dec 2018 12:43:05 +0100 Subject: Enable OTP 2FA - Update SchebTwoFactorBundle to version 3 - Enable Google 2fa on the bundle - Disallow ability to use both email and google as 2fa - Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7) - use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add` - update admin to be able to create/reset the 2fa --- src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form') 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 ->add('email', EmailType::class, [ 'label' => 'config.form_user.email_label', ]) - ->add('twoFactorAuthentication', CheckboxType::class, [ + ->add('emailTwoFactor', CheckboxType::class, [ 'required' => false, - 'label' => 'config.form_user.twoFactorAuthentication_label', + 'label' => 'config.form_user.emailTwoFactor_label', + ]) + ->add('googleTwoFactor', CheckboxType::class, [ + 'required' => false, + 'label' => 'config.form_user.googleTwoFactor_label', + 'mapped' => false, ]) ->add('save', SubmitType::class, [ 'label' => 'config.form.save', -- cgit v1.2.3 From baa5ee2d4292460425ca7f6572425f1fb1100d9d Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 8 Feb 2019 15:03:52 +0100 Subject: Force default_protocol to generate an url input --- src/Wallabag/CoreBundle/Form/Type/EditEntryType.php | 2 ++ src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | 1 + 2 files changed, 3 insertions(+) (limited to 'src/Wallabag/CoreBundle/Form') 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 'disabled' => true, 'required' => false, 'label' => 'entry.edit.url_label', + 'default_protocol' => null, ]) ->add('origin_url', UrlType::class, [ 'required' => false, 'property_path' => 'originUrl', 'label' => 'entry.edit.origin_url_label', + 'default_protocol' => null, ]) ->add('save', SubmitType::class, [ '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 ->add('url', UrlType::class, [ 'required' => true, 'label' => 'entry.new.form_new.url_label', + 'default_protocol' => null, ]) ; } -- cgit v1.2.3 From ea925bb112ab99efbb29d8e7113e80357a70bd18 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 27 Feb 2019 14:33:26 +0100 Subject: CS --- src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 702c7f7a..37d0640a 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -108,7 +108,7 @@ class EntryFilterType extends AbstractType ->add('httpStatus', TextFilterType::class, [ 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { $value = $values['value']; - if (false === array_key_exists($value, Response::$statusTexts)) { + if (false === \array_key_exists($value, Response::$statusTexts)) { return; } -- cgit v1.2.3 From 531c8d0a5c55fa93438e227a7d349235fbd31d28 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 13 Jun 2017 18:48:10 +0200 Subject: Changed RSS to Atom feed and improve paging --- src/Wallabag/CoreBundle/Form/Type/FeedType.php | 36 ++++++++++++++++++++++++++ src/Wallabag/CoreBundle/Form/Type/RssType.php | 36 -------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 src/Wallabag/CoreBundle/Form/Type/FeedType.php delete mode 100644 src/Wallabag/CoreBundle/Form/Type/RssType.php (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/FeedType.php b/src/Wallabag/CoreBundle/Form/Type/FeedType.php new file mode 100644 index 00000000..9b34daf4 --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/FeedType.php @@ -0,0 +1,36 @@ +add('feed_limit', null, [ + 'label' => 'config.form_feed.feed_limit', + 'property_path' => 'feedLimit', + ]) + ->add('save', SubmitType::class, [ + 'label' => 'config.form.save', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'Wallabag\CoreBundle\Entity\Config', + ]); + } + + public function getBlockPrefix() + { + return 'feed_config'; + } +} diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php deleted file mode 100644 index 49b31c1e..00000000 --- a/src/Wallabag/CoreBundle/Form/Type/RssType.php +++ /dev/null @@ -1,36 +0,0 @@ -add('rss_limit', null, [ - 'label' => 'config.form_rss.rss_limit', - 'property_path' => 'rssLimit', - ]) - ->add('save', SubmitType::class, [ - 'label' => 'config.form.save', - ]) - ; - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'data_class' => 'Wallabag\CoreBundle\Entity\Config', - ]); - } - - public function getBlockPrefix() - { - return 'rss_config'; - } -} -- cgit v1.2.3 From 34be2d5de44ade2a78be73decc0b90a2c1bca720 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 26 Jun 2019 22:31:47 +0200 Subject: Add ability to import/export tagging rules - Add missing translations - Add some tests - Add `/api/taggingrule/export` API endpoint - Add baggy theme - Add error message when importing tagging rules failed - Also fix all translations (I think we are good now) --- .../CoreBundle/Form/Type/TaggingRuleImportType.php | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php new file mode 100644 index 00000000..c6a8c0b8 --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php @@ -0,0 +1,29 @@ +add('file', FileType::class, [ + 'label' => 'config.form_rules.file_label', + 'required' => true, + ]) + ->add('import', SubmitType::class, [ + 'label' => 'config.form_rules.import_submit', + ]) + ; + } + + public function getBlockPrefix() + { + return 'upload_tagging_rule_file'; + } +} -- cgit v1.2.3 From 41022cb289f5d08418ccb2d7050098c4ee3721e4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 8 Jul 2019 14:45:45 +0200 Subject: Add ability to manually define the reading speed Instead of using a select, let the user decide its own speed. --- src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 11 +++-------- src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 1714ce74..6901fa08 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\IntegerType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -37,19 +38,13 @@ class ConfigType extends AbstractType 'choices' => array_flip($this->themes), 'label' => 'config.form_settings.theme_label', ]) - ->add('items_per_page', null, [ + ->add('items_per_page', IntegerType::class, [ 'label' => 'config.form_settings.items_per_page_label', 'property_path' => 'itemsPerPage', ]) - ->add('reading_speed', ChoiceType::class, [ + ->add('reading_speed', IntegerType::class, [ 'label' => 'config.form_settings.reading_speed.label', 'property_path' => 'readingSpeed', - 'choices' => [ - 'config.form_settings.reading_speed.100_word' => '0.5', - 'config.form_settings.reading_speed.200_word' => '1', - 'config.form_settings.reading_speed.300_word' => '1.5', - 'config.form_settings.reading_speed.400_word' => '2', - ], ]) ->add('action_mark_as_read', ChoiceType::class, [ 'label' => 'config.form_settings.action_mark_as_read.label', diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 37d0640a..8a575b68 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -54,8 +54,8 @@ class EntryFilterType extends AbstractType $lower = $values['value']['left_number'][0]; $upper = $values['value']['right_number'][0]; - $min = (int) ($lower * $this->user->getConfig()->getReadingSpeed()); - $max = (int) ($upper * $this->user->getConfig()->getReadingSpeed()); + $min = (int) ($lower * $this->user->getConfig()->getReadingSpeed() / 200); + $max = (int) ($upper * $this->user->getConfig()->getReadingSpeed() / 200); if (null === $lower && null === $upper) { // no value? no filter -- cgit v1.2.3 From 8d4ed0df0633f43fc2d65fef72c36070113844d1 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 12 Nov 2019 14:18:58 +0100 Subject: Update deps Also CS (because cs-fixer got an update) Package operations: 0 installs, 26 updates, 0 removals - Updating twig/twig (v2.12.1 => v2.12.2) - Updating symfony/symfony (v3.4.33 => v3.4.34) - Updating doctrine/event-manager (v1.0.0 => 1.1.0) - Updating doctrine/collections (v1.6.2 => 1.6.3) - Updating doctrine/cache (v1.8.1 => 1.9.0) - Updating doctrine/persistence (1.1.1 => 1.2.0) - Updating doctrine/inflector (v1.3.0 => 1.3.1) - Updating symfony/mime (v4.3.5 => v4.3.7) - Updating swiftmailer/swiftmailer (v6.2.1 => v6.2.3) - Updating symfony/swiftmailer-bundle (v3.3.0 => v3.3.1) - Updating doctrine/dbal (v2.9.2 => v2.9.3) - Updating doctrine/instantiator (1.2.0 => 1.3.0) - Updating j0k3r/graby-site-config (1.0.93 => 1.0.94) - Updating phpoption/phpoption (1.5.0 => 1.5.2) - Updating symfony/http-client-contracts (v1.1.7 => v1.1.8) - Updating symfony/http-client (v4.3.5 => v4.3.7) - Updating sensiolabs/security-checker (v6.0.2 => v6.0.3) - Updating paragonie/constant_time_encoding (v2.2.3 => v2.3.0) - Updating scheb/two-factor-bundle (v4.7.1 => v4.8.0) - Updating symfony/phpunit-bridge (v4.3.6 => v4.3.7) - Updating composer/xdebug-handler (1.3.3 => 1.4.0) - Updating friendsofphp/php-cs-fixer (v2.15.3 => v2.16.0) - Updating doctrine/data-fixtures (v1.3.2 => 1.3.3) - Updating nette/schema (v1.0.0 => v1.0.1) - Updating nikic/php-parser (v4.2.4 => v4.3.0) - Updating sentry/sentry (2.2.2 => 2.2.4) --- src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 8a575b68..17070c59 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -23,9 +23,6 @@ class EntryFilterType extends AbstractType /** * Repository & user are used to get a list of language entries for this user. - * - * @param EntityRepository $entryRepository - * @param TokenStorageInterface $tokenStorage */ public function __construct(EntityRepository $entryRepository, TokenStorageInterface $tokenStorage) { -- cgit v1.2.3