feat: add selectable country for custom destinations
This commit is contained in:
@@ -46,6 +46,7 @@ class DestinationType extends AbstractType
|
|||||||
'Frankreich' => 'f',
|
'Frankreich' => 'f',
|
||||||
'Italien' => 'i',
|
'Italien' => 'i',
|
||||||
'Deutschland' => 'd',
|
'Deutschland' => 'd',
|
||||||
|
'Niederlande' => 'nl',
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
|
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
|
||||||
@@ -88,4 +89,4 @@ class DestinationType extends AbstractType
|
|||||||
'data_class' => DestinationDto::class,
|
'data_class' => DestinationDto::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class DestinationDto
|
|||||||
#[Assert\NotBlank(message: 'Bitte angeben')]
|
#[Assert\NotBlank(message: 'Bitte angeben')]
|
||||||
private ?string $product = null;
|
private ?string $product = null;
|
||||||
|
|
||||||
#[Assert\Choice(choices: ['a', 'ch', 'd', 'f', 'i'], message: 'Ungültige Auswahl')]
|
#[Assert\Choice(choices: ['a', 'ch', 'd', 'f', 'i', 'nl'], message: 'Ungültige Auswahl')]
|
||||||
private ?string $country = null;
|
private ?string $country = null;
|
||||||
|
|
||||||
#[Assert\NotNull(message: 'Bitte das Beginndatum angeben')]
|
#[Assert\NotNull(message: 'Bitte das Beginndatum angeben')]
|
||||||
|
|||||||
Reference in New Issue
Block a user