feat: offer a newsletter opt-in for the other participants

addresses #869etn6c5
This commit is contained in:
fromme committed 2026-09-26 13:53:10 +02:00
1 parent 96b7b3f451
commit 876e69e62c
10 files changed
+598 -71

No files matched your search

+13
View File
@@ -44,6 +44,17 @@ class BookingCreateStep4Type extends AbstractType
]);
}
if (true === $options['show_companion_newsletter_opt_in']) {
// Deliberately no companion addresses in the label: the applicant already knows them,
// and rendering them would put other people's addresses on a shared screen.
$builder->add('companionNewsletterOptIn', CheckboxType::class, [
'label' => 'Ich möchte auch meine Mitfahrer:innen für den E&P Newsletter anmelden.',
'help' => 'Alle erhalten eine eigene Bestätigungs-E-Mail und werden erst nach ihrer eigenen Bestätigung angemeldet.',
'mapped' => false,
'required' => false,
]);
}
$builder
->add('confirmationAccepted', CheckboxType::class, [
'label' => 'Ich bestätige, dass alle Angaben korrekt sind und möchte verbindlich buchen.',
@@ -72,10 +83,12 @@ class BookingCreateStep4Type extends AbstractType
$resolver->setDefaults([
'data_class' => BookingDto::class,
'show_newsletter_opt_in' => false,
'show_companion_newsletter_opt_in' => false,
'newsletter_target_email' => null,
]);
$resolver->setAllowedTypes('show_newsletter_opt_in', 'bool');
$resolver->setAllowedTypes('show_companion_newsletter_opt_in', 'bool');
$resolver->setAllowedTypes('newsletter_target_email', ['null', 'string']);
}
}