From a3cf3a921d3254b4f40d9e96116dc24100b24cc7 Mon Sep 17 00:00:00 2001 From: adametz Date: Sat, 5 May 2018 14:54:41 +0000 Subject: [PATCH] Contact Form remove required git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3393 f459cee4-fb09-11de-96c3-f9c5f16c3c76 --- .../views/default/pages/contact.html.twig | 14 +------------- trunk/src/AppBundle/Form/ContactRequestType.php | 12 +++++++----- 2 files changed, 8 insertions(+), 18 deletions(-) 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')