Skip to content

Commit

Permalink
on tri alphabétiquement les champs de mode de transport
Browse files Browse the repository at this point in the history
  • Loading branch information
agallou committed May 23, 2024
1 parent cf972c1 commit a8f2143
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sources/AppBundle/Event/Form/TicketType.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,13 @@ public function buildForm(FormBuilderInterface $builder, array $options)
});

if ($event->getTransportInformationEnabled()) {
$transportMode = Ticket::TRANSPORT_MODES;
asort($transportMode);

$builder->add('transportMode', ChoiceType::class, [
'label' => 'Quel est votre mode de transport ?',
'required' => true,
'choices' => ['' => ''] + array_flip(Ticket::TRANSPORT_MODES),
'choices' => ['' => ''] + array_flip($transportMode),
]);

$builder->add('transportDistance', ChoiceType::class, [
Expand Down

0 comments on commit a8f2143

Please sign in to comment.