From 710f8e69d76c1a0d6279397c0283612ccef8ae69 Mon Sep 17 00:00:00 2001 From: Daniel Bartram Date: Mon, 9 May 2016 14:19:09 +0100 Subject: Add unread filter to entries pages Add the ability to filter for unread pages in the filters menu. --- src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (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 cd4d3490..f3f848e9 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -87,6 +87,18 @@ class EntryFilterType extends AbstractType ->add('isStarred', CheckboxFilterType::class, [ 'label' => 'entry.filters.starred_label', ]) + ->add('isUnread', CheckboxFilterType::class, [ + 'label' => 'entry.filters.unread_label', + 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { + if (false === $values['value']) { + return; + } + + $expression = $filterQuery->getExpr()->eq('e.isArchived', 'false'); + + return $filterQuery->createCondition($expression); + }, + ]) ->add('previewPicture', CheckboxFilterType::class, [ 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { if (false === $values['value']) { -- cgit v1.2.3 From 9c545fe028013b30417c1a932cd6b9027bff752d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 21 May 2016 18:09:38 +0200 Subject: Added name on client - Fix typos in field name - Added migration for name field in API client table Manually cherry-picked from PR https://github.com/wallabag/wallabag/pull/2171 --- src/Wallabag/CoreBundle/Form/Type/ClientType.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/ClientType.php index 8b351e60..d1fa94e6 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ClientType.php @@ -6,6 +6,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\UrlType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -14,7 +15,8 @@ class ClientType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('redirect_uris', UrlType::class, ['required' => true, 'label' => 'developer.client.form.redirect_uris_label']) + ->add('name', TextType::class, ['label' => 'developer.client.form.name_label']) + ->add('redirect_uris', UrlType::class, ['required' => false, 'label' => 'developer.client.form.redirect_uris_label']) ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) ; -- cgit v1.2.3 From ebe0787e093f4f2934430033015d6ebad1c64dca Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 16 Sep 2016 22:22:25 +0200 Subject: Moved Pocket token to user config --- src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 3 +++ 1 file changed, 3 insertions(+) (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 7d25cc80..0bac2874 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -52,6 +52,9 @@ class ConfigType extends AbstractType 'choices' => array_flip($this->languages), 'label' => 'config.form_settings.language_label', ]) + ->add('pocket_consumer_key', null, [ + 'label' => 'config.form_settings.pocket_consumer_key_label', + ]) ->add('save', SubmitType::class, [ 'label' => 'config.form.save', ]) -- cgit v1.2.3 From 03141f9b9548bca117136ba5bdcf811d9e59b155 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Oct 2016 17:46:44 +0200 Subject: Cleanup & add link on baggy menu --- src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 58 ----------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/Wallabag/CoreBundle/Form/Type/NewUserType.php (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php deleted file mode 100644 index 6a6f63d1..00000000 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ /dev/null @@ -1,58 +0,0 @@ -add('username', TextType::class, [ - 'required' => true, - 'label' => 'config.form_new_user.username_label', - ]) - ->add('plainPassword', RepeatedType::class, [ - 'type' => PasswordType::class, - 'invalid_message' => 'validator.password_must_match', - 'first_options' => ['label' => 'config.form_new_user.password_label'], - 'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'], - 'constraints' => [ - new Constraints\Length([ - 'min' => 8, - 'minMessage' => 'validator.password_too_short', - ]), - new Constraints\NotBlank(), - ], - 'label' => 'config.form_new_user.plain_password_label', - ]) - ->add('email', EmailType::class, [ - 'label' => 'config.form_new_user.email_label', - ]) - ->add('save', SubmitType::class, [ - 'label' => 'config.form.save', - ]) - ; - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'data_class' => 'Wallabag\UserBundle\Entity\User', - ]); - } - - public function getBlockPrefix() - { - return 'new_user'; - } -} -- cgit v1.2.3 From ee32248f43baef7e995c9e420cd00a137e626cf0 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 8 Oct 2016 00:02:22 +0200 Subject: Ensure access_token are removed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we remove the client, we should ensure that access_token are also removed. To ensure that, I created a test that generated an access_token. So when we remove the client, this association should be cascaded and shouldn’t generate an error. Also I moved some Api related stuff to the ApiBundle (like the developer controler and ClientType form) --- src/Wallabag/CoreBundle/Form/Type/ClientType.php | 46 ------------------------ 1 file changed, 46 deletions(-) delete mode 100644 src/Wallabag/CoreBundle/Form/Type/ClientType.php (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/ClientType.php deleted file mode 100644 index d1fa94e6..00000000 --- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php +++ /dev/null @@ -1,46 +0,0 @@ -add('name', TextType::class, ['label' => 'developer.client.form.name_label']) - ->add('redirect_uris', UrlType::class, ['required' => false, 'label' => 'developer.client.form.redirect_uris_label']) - ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) - ; - - $builder->get('redirect_uris') - ->addModelTransformer(new CallbackTransformer( - function ($originalUri) { - return $originalUri; - }, - function ($submittedUri) { - return [$submittedUri]; - } - )) - ; - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'data_class' => 'Wallabag\ApiBundle\Entity\Client', - ]); - } - - public function getBlockPrefix() - { - return 'client'; - } -} -- cgit v1.2.3