From c155e8c19e049e17e2bc55b6ca4d3bd9718fe6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Mon, 23 Oct 2023 16:10:56 +0200 Subject: [PATCH] Fix: Use form labels in favour of placeholders to avois issues on mob. --- src/Form/AssignmentFilterType.php | 22 ++++++++-------------- templates/admin/assignment/index.html.twig | 10 +++++----- templates/admin/index.html.twig | 4 ++-- templates/teamer/index.html.twig | 10 +++++----- 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/Form/AssignmentFilterType.php b/src/Form/AssignmentFilterType.php index 140bb02..04ab7c9 100644 --- a/src/Form/AssignmentFilterType.php +++ b/src/Form/AssignmentFilterType.php @@ -18,24 +18,18 @@ class AssignmentFilterType extends AbstractType { $builder ->add('dateFrom', DatepickerType::class, [ - 'label' => false, + 'label' => 'Zeitraum von', 'min_date' => $options['min_date'], 'max_date' => $options['max_date'], - 'attr' => [ - 'placeholder' => 'von', - ], ]) ->add('dateTo', DatepickerType::class, [ - 'label' => false, + 'label' => 'Zeitraum bis', 'min_date' => $options['min_date'], 'max_date' => $options['max_date'], - 'attr' => [ - 'placeholder' => 'bis', - ], ]) ->add('duration', ChoiceType::class, [ - 'label' => false, - 'placeholder' => 'Einsatzdauer', + 'label' => 'Einsatzdauer', + 'required' => false, 'choices' => [ 'Wochenende (2-4 Tage)' => AssignmentFilterDto::DURATION_WEEKEND, 'Midweek (5-6 Tage)' => AssignmentFilterDto::DURATION_MID_WEEK, @@ -54,9 +48,9 @@ class AssignmentFilterType extends AbstractType if (0 < count($options['job_profiles'])) { $builder ->add('jobProfile', EntityType::class, [ - 'label' => false, - 'placeholder' => 'Job-Profil', + 'label' => 'Job-Profil', 'class' => JobProfile::class, + 'required' => false, 'choice_label' => 'name', 'choices' => $options['job_profiles'], ]) @@ -65,9 +59,9 @@ class AssignmentFilterType extends AbstractType if (0 < count($options['destinations'])) { $builder ->add('destination', EntityType::class, [ - 'label' => false, - 'placeholder' => 'Destination', + 'label' => 'Destination', 'class' => Destination::class, + 'required' => false, 'choice_label' => function (Destination $destination) { return $destination->getProduct(); }, diff --git a/templates/admin/assignment/index.html.twig b/templates/admin/assignment/index.html.twig index 9779082..315ea4a 100644 --- a/templates/admin/assignment/index.html.twig +++ b/templates/admin/assignment/index.html.twig @@ -9,11 +9,11 @@ {{ form_start(filterForm) }}
- {{ form_widget(filterForm.dateFrom) }} - {{ form_widget(filterForm.dateTo) }} - {{ form_widget(filterForm.jobProfile) }} - {{ form_widget(filterForm.destination) }} - {{ form_widget(filterForm.duration) }} + {{ form_row(filterForm.dateFrom) }} + {{ form_row(filterForm.dateTo) }} + {{ form_row(filterForm.jobProfile) }} + {{ form_row(filterForm.destination) }} + {{ form_row(filterForm.duration) }}