added option to use only pre-defined tags (#1463)

This commit is contained in:
Kevin Papst
2020-02-12 15:35:42 +01:00
committed by GitHub
parent 847798eec1
commit 1b4f4bba22
16 changed files with 103 additions and 24 deletions

View File

@@ -15,8 +15,7 @@ use App\Form\Type\DateRangeType;
use App\Form\Type\PageSizeType;
use App\Form\Type\ProjectType;
use App\Form\Type\SearchTermType;
use App\Form\Type\TagsInputType;
use App\Form\Type\TagsSelectType;
use App\Form\Type\TagsType;
use App\Form\Type\UserRoleType;
use App\Form\Type\UserType;
use App\Form\Type\VisibilityType;
@@ -225,20 +224,11 @@ abstract class AbstractToolbarForm extends AbstractType
protected function addTagInputField(FormBuilderInterface $builder)
{
$builder->add('tags', TagsInputType::class, [
$builder->add('tags', TagsType::class, [
'required' => false
]);
}
// TODO add a system setting to control if tags can be created on the fly
protected function addTagSelectField(FormBuilderInterface $builder)
{
$builder->add('tags', TagsSelectType::class, [
'required' => false,
'multiple' => true,
]);
}
protected function addSearchTermInputField(FormBuilderInterface $builder)
{
$builder->add('searchTerm', SearchTermType::class);