added filter for global activities (#614)
This commit is contained in:
@@ -82,7 +82,7 @@ abstract class AbstractToolbarForm extends AbstractType
|
||||
* @param FormBuilderInterface $builder
|
||||
* @param null|string $label
|
||||
*/
|
||||
protected function addVisibilityChoice(FormBuilderInterface $builder, ?string $label = null)
|
||||
protected function addVisibilityChoice(FormBuilderInterface $builder, string $label = 'label.visible')
|
||||
{
|
||||
$builder->add('visibility', VisibilityType::class, [
|
||||
'required' => false,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace App\Form\Toolbar;
|
||||
|
||||
use App\Repository\Query\ActivityQuery;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -25,6 +26,15 @@ class ActivityToolbarForm extends AbstractToolbarForm
|
||||
{
|
||||
$this->addPageSizeChoice($builder);
|
||||
$this->addVisibilityChoice($builder);
|
||||
$builder->add('globalsOnly', ChoiceType::class, [
|
||||
'choices' => [
|
||||
'yes' => 1,
|
||||
'no' => 0,
|
||||
],
|
||||
'placeholder' => null,
|
||||
'required' => false,
|
||||
'label' => 'label.globalsOnly',
|
||||
]);
|
||||
$this->addCustomerChoice($builder);
|
||||
$this->addProjectChoice($builder);
|
||||
$this->addHiddenPagination($builder);
|
||||
|
||||
Reference in New Issue
Block a user