2015-10-22 14:57:56 +00:00
|
|
|
<?php
|
|
|
|
|
2024-02-19 00:30:12 +00:00
|
|
|
namespace Wallabag\Form\Type;
|
2015-10-22 14:57:56 +00:00
|
|
|
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
2016-02-12 14:59:13 +00:00
|
|
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
2017-07-01 07:52:38 +00:00
|
|
|
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
|
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
2015-10-22 14:57:56 +00:00
|
|
|
|
|
|
|
class UploadImportType extends AbstractType
|
|
|
|
{
|
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
|
|
{
|
|
|
|
$builder
|
2016-04-12 09:36:01 +00:00
|
|
|
->add('file', FileType::class, [
|
2016-03-09 07:59:08 +00:00
|
|
|
'label' => 'import.form.file_label',
|
2016-09-11 18:24:04 +00:00
|
|
|
'required' => true,
|
2016-04-12 09:36:01 +00:00
|
|
|
])
|
|
|
|
->add('mark_as_read', CheckboxType::class, [
|
2016-03-09 07:59:08 +00:00
|
|
|
'label' => 'import.form.mark_as_read_label',
|
2016-03-04 09:04:51 +00:00
|
|
|
'required' => false,
|
2016-04-12 09:36:01 +00:00
|
|
|
])
|
|
|
|
->add('save', SubmitType::class, [
|
2016-03-09 07:59:08 +00:00
|
|
|
'label' => 'import.form.save_label',
|
2016-04-12 09:36:01 +00:00
|
|
|
])
|
2015-10-22 14:57:56 +00:00
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2016-01-09 17:38:40 +00:00
|
|
|
public function getBlockPrefix()
|
2015-10-22 14:57:56 +00:00
|
|
|
{
|
|
|
|
return 'upload_import_file';
|
|
|
|
}
|
|
|
|
}
|