diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-26 22:31:47 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-07-08 09:38:32 +0200 |
commit | 34be2d5de44ade2a78be73decc0b90a2c1bca720 (patch) | |
tree | d635438784c4b02e1d182cfbc3d47b62e5032f1d /src/Wallabag/CoreBundle/Form | |
parent | 92cd51aa2c29e23f137cde9b9732ced33ff38e59 (diff) | |
download | wallabag-34be2d5de44ade2a78be73decc0b90a2c1bca720.tar.gz wallabag-34be2d5de44ade2a78be73decc0b90a2c1bca720.tar.zst wallabag-34be2d5de44ade2a78be73decc0b90a2c1bca720.zip |
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)
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\FileType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
8 | use Symfony\Component\Form\FormBuilderInterface; | ||
9 | |||
10 | class TaggingRuleImportType extends AbstractType | ||
11 | { | ||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
13 | { | ||
14 | $builder | ||
15 | ->add('file', FileType::class, [ | ||
16 | 'label' => 'config.form_rules.file_label', | ||
17 | 'required' => true, | ||
18 | ]) | ||
19 | ->add('import', SubmitType::class, [ | ||
20 | 'label' => 'config.form_rules.import_submit', | ||
21 | ]) | ||
22 | ; | ||
23 | } | ||
24 | |||
25 | public function getBlockPrefix() | ||
26 | { | ||
27 | return 'upload_tagging_rule_file'; | ||
28 | } | ||
29 | } | ||