added option to use only pre-defined tags (#1463)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
namespace App\Form\API;
|
||||
|
||||
use App\Form\TimesheetEditForm;
|
||||
use App\Form\Type\TagsInputType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -29,6 +30,19 @@ class TimesheetApiEditForm extends TimesheetEditForm
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method added to prevent API BC breaks.
|
||||
*
|
||||
* @param FormBuilderInterface $builder
|
||||
*/
|
||||
protected function addTags(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
->add('tags', TagsInputType::class, [
|
||||
'required' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
|
||||
Reference in New Issue
Block a user