From f9362d8886466599b3024d696a6f70eadc605f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Fri, 2 May 2025 12:51:39 +0200 Subject: [PATCH] feat: allow editing of email and phone unless applicant --- src/Form/ParticipantType.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Form/ParticipantType.php b/src/Form/ParticipantType.php index b6f2909..6a81ac8 100644 --- a/src/Form/ParticipantType.php +++ b/src/Form/ParticipantType.php @@ -33,6 +33,7 @@ class ParticipantType extends AbstractType $form = $event->getForm(); $personalDataMutable = $options['personal_data_mutable'] && $participantData->mutable; + $isApplicant = 1 === $participantIndex; $form ->add('firstName', TextType::class, [ @@ -83,14 +84,14 @@ class ParticipantType extends AbstractType 'label' => 'E-Mail', 'required' => false, 'attr' => [ - 'readonly' => false === $personalDataMutable, + 'readonly' => true === $isApplicant, ], ]) ->add('mobile', TextType::class, [ 'label' => 'Telefon (mobil)', 'required' => false, 'attr' => [ - 'readonly' => false === $personalDataMutable, + 'readonly' => true === $isApplicant, ], ]) ->add('height', ChoiceType::class, [