{% extends "Layout/default.html.twig" %}
{#{% do pimcore_placeholder('add-hashcash-script').set(true) %}#}
{% block content %}
{{ include('Content/includes/hero.html.twig') }}
{{ include('Navigation/breadcrumb.html.twig') }}
{{ include('Includes/main-title-block-splitted-editable.html.twig') }}
{{ include('Includes/areablock.html.twig') }}
{% if editmode %}
<div class="editmode-box editmode-box--info">
<div class="editmode-box__header">
Settings
</div>
<div class="alert alert-info">
if no region select in use. The region found in properties will be used to determine the correct email address
</div>
<div class="row">
<div class="col-6">
<label>
Topics: <br>
{{ pimcore_relations('topics', {'types': ['object'], 'subtypes': ['object'], 'classes': ['ContactTopic'], width: 600}) }}
</label>
</div>
<div class="col-6">
<label>
Regions: <br>
{{ pimcore_relations('regions', {'types': ['object'], 'subtypes': ['object'], 'classes': ['Region'], width: 600}) }}
</label>
</div>
<div class="col-6">
<label>
Preselect Topic: <br>
{{ pimcore_relation('topic', {'types': ['object'], 'subtypes': ['object'], 'classes': ['ContactTopic'], width: 600}) }}
</label>
</div>
<div class="col-6">
<label>
Preselect Region: <br>
{{ pimcore_relation('region', {'types': ['object'], 'subtypes': ['object'], 'classes': ['Region'], width: 600}) }}
</label>
</div>
</div>
Success Page:
<br>
{{ pimcore_relation('success', {'types': ['document'], 'subtypes': ['page']}) }}
<br>
Email Document:
<br>
{{ pimcore_relation('email', {'types': ['document'], 'subtypes': ['email']}) }}
<br>
Use company instead of title: {{ pimcore_checkbox('use_company', {reload:true}) }}
</div>
{% endif %}
<section class="slide content-block bg-secondary">
<div class="container">
{{ include('Includes/title-block-editable.html.twig', {'isWhite': true, 'isCentered': true, 'suffix': 'contact-'}) }}
</div>
{% do jsConfig().add({
'recaptchaPublicKey': recaptchaExtension().publicKey,
'recaptcha': true
}) %}
<div class="container container-narrow">
{% if errors |default(false) %}
<div class="alert alert-danger">
<ul>
{% for error in errors %}
<li>{{ ('contact.error.'~ error)|trans }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<form action="{{ app.request.pathInfo }}" class="js-elhc-form js-elhc-form-ajax js-form-validation" method="POST">
<div hidden>
{{ include('Form/Includes/form-control.html.twig', {
name: 'potNumber',
id: 'potNumber',
value: ''
}) }}
</div>
<div class="row">
{% if not pimcore_relations('topics').empty %}
<div class="col-md-6">
{% set default = [{
"label": "",
"value": "",
"disabled": true,
"selected": true,
"class": "sr-only"
}] %}
{{ include('Form/Includes/select.html.twig', {
id: 'topic-select',
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
name: "topic",
required: true,
label: 'contact.Thema auswählen'|trans,
options: default|merge(pimcore_relations('topics').elements | map( x => {
"label": x.name,
"value": x.id,
"class": ""
})),
errors: errors['topic'] is defined ? [errors['topic']] : null
}) }}
</div>
{% endif %}
{% if not pimcore_relations('regions').empty %}
<div class="col-md-6">
{% set default = [{
"label": "",
"value": "",
"disabled": true,
"selected": true,
"class": "sr-only"
}] %}
{{ include('Form/Includes/select.html.twig', {
id: 'region-select',
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
name: "region",
required: true,
label: 'contact.Region auswählen'|trans,
options: default|merge(pimcore_relations('regions').elements | map( x => {
"label": x.name,
"value": x.id,
"class": ""
})),
errors: errors['region'] is defined ? [errors['region']] : null
}) }}
</div>
{% endif %}
</div>
<div class="row">
<div class="col-md-6">
{{ include('Form/Includes/select.html.twig', {
id: 'salutation',
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
name: "salutation",
required: true,
label: 'contact.Anrede'|trans,
styleModifier: 'form-group--sm',
options: [
{
"label": "",
"value": "",
"disabled": true,
"selected": true,
"class": "sr-only"
}, {
"label": 'newsletter.Frau'|trans,
"value": 'female',
"class": '',
}, {
"label": 'newsletter.Herr'|trans,
"value": 'male',
"class": ""
}, {
"label": 'newsletter.Familie/Firma'|trans,
"value": 'other',
"class": ""
},],
errors: errors['salutation'] is defined ? [errors['salutation']] : null,
}) }}
</div>
<div class="col-md-6">
{% if pimcore_checkbox('use_company').checked %}
{{ include('Form/Includes/form-control.html.twig', {
id: 'company',
name: 'company',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Company'|trans
}) }}
{% else %}
{{ include('Form/Includes/form-control.html.twig', {
id: 'title',
name: 'title',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Titel'|trans
}) }}
{% endif %}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'firstname',
name: 'firstname',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Vorname'|trans,
required: true,
errors: errors['firstname'] is defined ? [errors['firstname']] : null
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'lastname',
name: 'lastname',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Nachname'|trans,
required: true,
errors: errors['lastname'] is defined ? [errors['lastname']] : null
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'phone',
name: 'phone',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Telefon'|trans,
type: 'tel'
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'email',
name: 'email',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.E-Mail'|trans,
type: 'email',
required: true,
errors: errors['email'] is defined ? [errors['email']] : null
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'street',
name: 'street',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Straße'|trans,
type: 'text',
required: false,
errors: errors['street'] is defined ? [errors['street']] : null
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'zip',
name: 'zip',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.PLZ'|trans,
type: 'text',
required: false,
errors: errors['zip'] is defined ? [errors['zip']] : null
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/form-control.html.twig', {
id: 'city',
name: 'city',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Stadt'|trans,
type: 'text',
required: false,
errors: errors['city'] is defined ? [errors['city']] : null
}) }}
</div>
<div class="col-md-6">
{{ include('Form/Includes/select.html.twig', {
id: 'country',
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
name: "country",
required: true,
label: 'contact.Land'|trans,
styleModifier: 'form-group--sm',
options: getCountrySelectData(app.request.locale, app.request.get('country', '')),
errors: errors['country'] is defined ? [errors['country']] : null,
}) }}
</div>
<div class="col-12">
{{ include('Form/Includes/text-area.html.twig', {
id: 'message',
name: 'message',
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'contact.Anregungen/Wünsche'|trans,
required: true,
rows: 5,
errors: errors['message'] is defined ? [errors['message']] : null
}) }}
</div>
{% if elements_debug_mode() and siteConfig.id != getMainConfig() %}
<div class="col-md-12">
{{ include('Form/Includes/checkbox.html.twig', {
id: 'numbirds',
name: 'numbirds',
label: 'footer.newsletter Numbirds'|trans,
required: false,
errors: errors['numbirds'] is defined ? [errors['numbirds']] : null
}) }}
</div>
{% endif %}
</div>
<div class="text-right small">
* {{ 'contact.Pflichtfelder'|trans }}
</div>
{{ include('Form/Includes/form-control.html.twig', {
type: 'hidden',
name: 'gdpr-text',
id: 'gdpr-text',
value: 'contact.Ich stimme den <a href="#">Datenschutzbestimmungen</a> zu.'|trans
}) }}
<div>{{ 'contact.Ich stimme den <a href="#">Datenschutzbestimmungen</a> zu.'|trans|raw }}</div>
<div class="text-center mt-4">
<button type="submit" class="btn btn-primary-light">{{ 'contact.Kontaktanfrage senden'|trans }}</button>
</div>
</form>
</div>
</section>
{{ include('Includes/areablock.html.twig', {'areaName': 'bottomContent'}) }}
{% endblock %}