feat: allow editing of email and phone unless applicant
This commit is contained in:
@@ -33,6 +33,7 @@ class ParticipantType extends AbstractType
|
|||||||
$form = $event->getForm();
|
$form = $event->getForm();
|
||||||
|
|
||||||
$personalDataMutable = $options['personal_data_mutable'] && $participantData->mutable;
|
$personalDataMutable = $options['personal_data_mutable'] && $participantData->mutable;
|
||||||
|
$isApplicant = 1 === $participantIndex;
|
||||||
|
|
||||||
$form
|
$form
|
||||||
->add('firstName', TextType::class, [
|
->add('firstName', TextType::class, [
|
||||||
@@ -83,14 +84,14 @@ class ParticipantType extends AbstractType
|
|||||||
'label' => 'E-Mail',
|
'label' => 'E-Mail',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'readonly' => false === $personalDataMutable,
|
'readonly' => true === $isApplicant,
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
->add('mobile', TextType::class, [
|
->add('mobile', TextType::class, [
|
||||||
'label' => 'Telefon (mobil)',
|
'label' => 'Telefon (mobil)',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'readonly' => false === $personalDataMutable,
|
'readonly' => true === $isApplicant,
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
->add('height', ChoiceType::class, [
|
->add('height', ChoiceType::class, [
|
||||||
|
|||||||
Reference in New Issue
Block a user