forked from wallabag/wallabag
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)
This commit is contained in:
29
src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php
Normal file
29
src/Wallabag/CoreBundle/Form/Type/TaggingRuleImportType.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class TaggingRuleImportType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user