fix: show rental insurance field only when applicable
This commit is contained in:
@@ -256,12 +256,14 @@ class ParticipantType extends AbstractType
|
||||
'choices' => $options['selectable_parking'],
|
||||
]);
|
||||
|
||||
// Rental Insurance - single checkbox (always add, JS will show/hide when rentals selected)
|
||||
$form->add('rentalInsurance', ChoiceType::class, [
|
||||
...$commonChoiceFieldOptions,
|
||||
'label' => 'Leihausrüstungsversicherung',
|
||||
'choices' => $options['selectable_rental_insurance'],
|
||||
]);
|
||||
// Rental Insurance - single checkbox (only add if available, JS will show/hide when rentals selected)
|
||||
if (0 < count($options['selectable_rental_insurance'])) {
|
||||
$form->add('rentalInsurance', ChoiceType::class, [
|
||||
...$commonChoiceFieldOptions,
|
||||
'label' => false,
|
||||
'choices' => $options['selectable_rental_insurance'],
|
||||
]);
|
||||
}
|
||||
|
||||
// Transportation
|
||||
$transportationChoiceAttributes = function (?Service $service) use ($options) {
|
||||
|
||||
Reference in New Issue
Block a user