diff --git a/trunk/app/Resources/views/default/pages/contact.html.twig b/trunk/app/Resources/views/default/pages/contact.html.twig index 49e92129..0016bf24 100644 --- a/trunk/app/Resources/views/default/pages/contact.html.twig +++ b/trunk/app/Resources/views/default/pages/contact.html.twig @@ -45,13 +45,10 @@
-
{{ form_field_pho(contact_form.salutation) }} -
-
-
+
{{ form_field_pho(contact_form.firstName, 'Vorname') }}
@@ -67,23 +64,14 @@
{{ form_field_pho(contact_form.city, 'Ort') }}
{{ form_field_pho(contact_form.nation) }}
-
{{ form_field_pho(contact_form.phone, 'Telefon tagsüber') }} -
-
{{ form_field_pho(contact_form.mobilePhone, 'Telefon mobil') }}
-
{{ form_field_pho(contact_form.email, 'E-Mail-Adresse') }} -
-
-
{{ form_field_pho(contact_form.travelerCount) }} -
-
diff --git a/trunk/src/AppBundle/Form/ContactRequestType.php b/trunk/src/AppBundle/Form/ContactRequestType.php index ead6d280..ee706d7c 100644 --- a/trunk/src/AppBundle/Form/ContactRequestType.php +++ b/trunk/src/AppBundle/Form/ContactRequestType.php @@ -46,11 +46,11 @@ class ContactRequestType extends AbstractType 'placeholder' => 'Anrede (Bitte wählen) *', 'choices' => BookingRequestType::$SALUTATION_CHOICES, 'constraints' => [ - new NotNull(), new Choice(['choices' => BookingRequestType::$SALUTATION_CHOICES]) - ] + ], + 'required' => false, ]) - ->add('firstName', TextType::class, ['required' => true]) + ->add('firstName', TextType::class, ['required' => false]) ->add('lastName', TextType::class, ['required' => true]) ->add('streetAddress') ->add('zipCode') @@ -64,14 +64,16 @@ class ContactRequestType extends AbstractType ], 'data' => BookingRequestType::$NATION_CHOICES['Deutschland'], ]) - ->add('phone', TextType::class, ['required' => true]) + ->add('phone', TextType::class, ['required' => false]) ->add('mobilePhone') ->add('email', EmailType::class, ['required' => true]) ->add('travelerCount', ChoiceType::class, [ 'placeholder' => 'Anzahl der Reisenden (Bitte wählen)', 'choices' => $travelerCountChoices, 'constraints' => [ - new Choice(['choices' => $travelerCountChoices])] + new Choice(['choices' => $travelerCountChoices]) + ], + 'required' => false, ]) ->add('notes', TextareaType::class, ['required' => false]) ->add('departure0')