From 0c83fd5994861efa728097dd151c994796c39ae1 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 28 Mar 2015 14:27:45 +0100 Subject: Add rss for entries will fix #1000 --- src/Wallabag/CoreBundle/Form/Type/RssType.php | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Form/Type/RssType.php (limited to 'src/Wallabag/CoreBundle/Form') diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php new file mode 100644 index 00000000..5edb38ba --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php @@ -0,0 +1,29 @@ +add('rss_limit', 'text') + ->add('save', 'submit') + ; + } + + public function setDefaultOptions(OptionsResolverInterface $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'Wallabag\CoreBundle\Entity\Config', + )); + } + + public function getName() + { + return 'rss_config'; + } +} -- cgit v1.2.3 From 371ac69a6bd6325929e4efee7958682a6b1666f7 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 28 Mar 2015 21:43:49 +0100 Subject: Add tests and fix few mistakes --- src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 2 +- src/Wallabag/CoreBundle/Form/Type/RssType.php | 2 +- 2 files changed, 2 insertions(+), 2 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 0c8706e2..0fcf020a 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -24,7 +24,7 @@ class ConfigType extends AbstractType { $builder ->add('theme', 'choice', array('choices' => $this->themes)) - ->add('items_per_page', 'text') + ->add('items_per_page') ->add('language') ->add('save', 'submit') ; diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php index 5edb38ba..a1ab990f 100644 --- a/src/Wallabag/CoreBundle/Form/Type/RssType.php +++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php @@ -10,7 +10,7 @@ class RssType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('rss_limit', 'text') + ->add('rss_limit') ->add('save', 'submit') ; } -- cgit v1.2.3