wip: confirmation step

This commit is contained in:
Björn Fromme
2026-03-16 11:59:10 +01:00
parent 3f7db4e772
commit ee264e88d4
5 changed files with 277 additions and 4 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace App\Form;
use App\Form\Model\BookingCreateDto;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints as Assert;
class BookingCreateStep4Type extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('confirmationAccepted', CheckboxType::class, [
'label' => 'Ich bestätige, dass alle Angaben korrekt sind und möchte verbindlich buchen.',
'mapped' => false,
'constraints' => [
new Assert\IsTrue(
message: 'Bitte bestätigen Sie Ihre Buchung.'
),
],
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => BookingCreateDto::class,
]);
}
}