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,7 +15,7 @@ use App\Entity\Project;
use App\Form\Type\ActivityType;
use App\Form\Type\CustomerType;
use App\Form\Type\ProjectType;
use App\Form\Type\TagsInputType;
use App\Form\Type\TagsType;
use App\Repository\ActivityRepository;
use App\Repository\CustomerRepository;
use App\Repository\ProjectRepository;
@@ -29,6 +29,7 @@ use Symfony\Component\Form\FormEvents;
/**
* Defines the form used to manipulate Timesheet entries.
* @internal
*/
trait FormTrait
{
@@ -148,12 +149,7 @@ trait FormTrait
protected function addTags(FormBuilderInterface $builder)
{
$builder
->add('tags', TagsInputType::class, [
// documentation is for NelmioApiDocBundle
'documentation' => [
'type' => 'string',
'description' => 'Comma separated list of tags',
],
->add('tags', TagsType::class, [
'required' => false,
]);
}