Contact Form remove required

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3393 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-05-05 14:54:41 +00:00
parent 53b84270df
commit a3cf3a921d
2 changed files with 8 additions and 18 deletions

View file

@ -45,13 +45,10 @@
</div>
<div class="form-group col-md-12 col-sm-12 col-xs-12">
<div class="required">
{{ form_field_pho(contact_form.salutation) }}
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-6 col-sm-6 col-xs-12">
<div class="required">
<div class="">
{{ form_field_pho(contact_form.firstName, 'Vorname') }}
</div>
<div class="help-block with-errors"></div>
@ -67,23 +64,14 @@
<div class="col-md-6 col-sm-6 col-xs-12">{{ form_field_pho(contact_form.city, 'Ort') }}</div>
<div class="form-group col-md-12 col-sm-12 col-xs-12">{{ form_field_pho(contact_form.nation) }}</div>
<div class="form-group col-md-6 col-sm-6 col-xs-12">
<div class="required">
{{ form_field_pho(contact_form.phone, 'Telefon tagsüber') }}
</div>
<div class="help-block with-errors"></div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">{{ form_field_pho(contact_form.mobilePhone, 'Telefon mobil') }}</div>
<div class="form-group col-md-12 col-sm-12 col-xs-12">
<div class="required">
{{ form_field_pho(contact_form.email, 'E-Mail-Adresse') }}
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-12 col-sm-12 col-xs-12">
<div class="required">
{{ form_field_pho(contact_form.travelerCount) }}
</div>
<div class="help-block with-errors"></div>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">

View file

@ -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')