From f66a2ad18b050c021b8c35c107705be0c469c095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20CROMBEZ?= <777666+jcrombez@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:01:59 +0200 Subject: [PATCH] Update DateRangeType.php --- src/Form/DateRangeType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Form/DateRangeType.php b/src/Form/DateRangeType.php index eb46050..425acb7 100644 --- a/src/Form/DateRangeType.php +++ b/src/Form/DateRangeType.php @@ -14,12 +14,12 @@ public function buildForm(FormBuilderInterface $builder, array $options): void { $builder ->add('start', DateType::class, [ - 'label' => 'From', + 'label' => $options['start_label'], 'widget' => 'single_text', 'required' => false, ]) ->add('end', DateType::class, [ - 'label' => 'To', + 'label' => $options['end_label'], 'widget' => 'single_text', 'required' => false, ]) @@ -30,6 +30,8 @@ public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'data_class' => DateRange::class, + 'start_label' => 'From', + 'end_label' => 'To', ]); } }