mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Do not show a unecessary label in front of the boolean constraint types checkboxes
This commit is contained in:
parent
d258235430
commit
363b7bc314
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,8 @@ use App\DataTables\Filters\Constraints\BooleanConstraint;
|
||||||
use App\Form\Type\TriStateCheckboxType;
|
use App\Form\Type\TriStateCheckboxType;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
use Symfony\Component\Form\FormView;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
class BooleanConstraintType extends AbstractType
|
class BooleanConstraintType extends AbstractType
|
||||||
|
@ -43,4 +45,10 @@ class BooleanConstraintType extends AbstractType
|
||||||
'required' => false,
|
'required' => false,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function finishView(FormView $view, FormInterface $form, array $options)
|
||||||
|
{
|
||||||
|
//Remove the label from the compound form, as the checkbox already has a label
|
||||||
|
$view->vars['label'] = false;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue