feat: link terms in confirmation checkbox label
This commit is contained in:
@@ -50,6 +50,7 @@ APP_BPN_STREAM_TIMEOUT=30
|
|||||||
APP_BPN_TOTAL_TIMEOUT=45
|
APP_BPN_TOTAL_TIMEOUT=45
|
||||||
|
|
||||||
APP_TRAVEL_INFO_BASE_URL="https://www.ep-reisen.de/reiseinformationen/"
|
APP_TRAVEL_INFO_BASE_URL="https://www.ep-reisen.de/reiseinformationen/"
|
||||||
|
APP_TERMS_AND_CONDITIONS_URL="https://www.ep-reisen.de/skireisen/infos/allgemeine-infos/agb/"
|
||||||
APP_CMS_API_BASE_URL="https://www.ep-reisen.de/"
|
APP_CMS_API_BASE_URL="https://www.ep-reisen.de/"
|
||||||
APP_WEBSITE_BASE_URL="https://www.ep-reisen.de/"
|
APP_WEBSITE_BASE_URL="https://www.ep-reisen.de/"
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
||||||
parameters:
|
parameters:
|
||||||
travel_info_base_url: '%env(APP_TRAVEL_INFO_BASE_URL)%'
|
travel_info_base_url: '%env(APP_TRAVEL_INFO_BASE_URL)%'
|
||||||
|
terms_and_conditions_url: '%env(APP_TERMS_AND_CONDITIONS_URL)%'
|
||||||
path_to_keys: '%kernel.project_dir%/config/secret'
|
path_to_keys: '%kernel.project_dir%/config/secret'
|
||||||
|
|
||||||
# Body dimensions choices for BodyDimensionsType
|
# Body dimensions choices for BodyDimensionsType
|
||||||
@@ -38,6 +39,7 @@ services:
|
|||||||
$xmlDump: '@xml_dump.storage'
|
$xmlDump: '@xml_dump.storage'
|
||||||
$jsonExport: '@json_export.storage'
|
$jsonExport: '@json_export.storage'
|
||||||
$travelInfoBaseUrl: '%env(APP_TRAVEL_INFO_BASE_URL)%'
|
$travelInfoBaseUrl: '%env(APP_TRAVEL_INFO_BASE_URL)%'
|
||||||
|
$termsAndConditionsUrl: '%terms_and_conditions_url%'
|
||||||
$logger: '@monolog.logger.core'
|
$logger: '@monolog.logger.core'
|
||||||
$environment: '%kernel.environment%'
|
$environment: '%kernel.environment%'
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,18 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||||||
|
|
||||||
class BookingCreateStep4Type extends AbstractType
|
class BookingCreateStep4Type extends AbstractType
|
||||||
{
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly string $termsAndConditionsUrl,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
{
|
{
|
||||||
|
$termsLink = sprintf(
|
||||||
|
'<a href="%s" target="_blank" rel="noopener" class="underline">AGB</a>',
|
||||||
|
htmlspecialchars($this->termsAndConditionsUrl, ENT_QUOTES, 'UTF-8')
|
||||||
|
);
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('confirmationAccepted', CheckboxType::class, [
|
->add('confirmationAccepted', CheckboxType::class, [
|
||||||
'label' => 'Ich bestätige, dass alle Angaben korrekt sind und möchte verbindlich buchen.',
|
'label' => 'Ich bestätige, dass alle Angaben korrekt sind und möchte verbindlich buchen.',
|
||||||
@@ -26,7 +36,8 @@ class BookingCreateStep4Type extends AbstractType
|
|||||||
],
|
],
|
||||||
])
|
])
|
||||||
->add('termsAccepted', CheckboxType::class, [
|
->add('termsAccepted', CheckboxType::class, [
|
||||||
'label' => 'Ich bestätige, dass ich die AGB akzeptiere',
|
'label' => sprintf('Ich bestätige, dass ich die %s akzeptiere', $termsLink),
|
||||||
|
'label_html' => true,
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new Assert\IsTrue(
|
new Assert\IsTrue(
|
||||||
|
|||||||
Reference in New Issue
Block a user