{% import 'common/macros/elements.html.twig' as elements %}
{% import 'common/macros/forms.html.twig' as forms %}
{% import 'common/macros/svg.html.twig' as svg %}
{% set lang = app.session.get('locale')|default('en') %}
{% set formLang = lang == 'hu' ? 'hu-HU' : 'en-US' %}
{% set contactForm = getMessageForm(location ?? null).createView() %}
<section class="contact-form-section section {{ theme|default('dark') }}" id="get_in_touch">
<div class="overlay">
{{ svg.footer_icf }}
</div>
<div class="form-wrapper">
<div class="section-header">
{{ elements.heading('common.contact'|trans|upper, 4, 'section-category') }}
{% if location is not defined %}
{{ elements.heading(
'contact_form.we_d_love_to_hear'|trans ~
'<br/>' ~
'contact_form.from_you'|trans,
2,
'section-title'
) }}
{% else %}
{{ elements.heading(
'contact_form.get_in_touch'|trans ~
(lang == 'en' ? ' ' ~ location.getCity() : ''),
2,
'section-title'
) }}
{% endif %}
</div>
<div class="contact-form">
<div role="form" lang="{{ formLang }}" dir="ltr">
{{ form_start(contactForm, {'attr': {'novalidate': 'novalidate'}}) }}
{{ form_widget(contactForm._token) }}
{{ form_errors(contactForm) }}
<div class="form-elements">
<div class="styled-select" style="{{ location is not defined ? '' : 'display:none' }}">
{{ form_widget(
contactForm.type,
{
'id': 'contact_type',
'value':
(location is not defined or (location|lower == 'amsterdam')) and defaultInquiry is not defined
? 'customer_service'
: 'general_inquiry',
'attr': {
'placeholder': 'contact_form.your_name'|trans
}
}
) }}
</div>
{{ form_errors(contactForm.type) }}
<p>{{ form_widget(contactForm.name, {'attr': {'placeholder': 'contact_form.your_name'|trans}}) }}</p>
{{ form_errors(contactForm.name) }}
<p>{{ form_widget(contactForm.phoneNumber, {'attr': {'placeholder': 'contact_form.phone_number'|trans}}) }}</p>
{{ form_errors(contactForm.phoneNumber) }}
<p>{{ form_widget(contactForm.email, {'attr': {'placeholder': 'contact_form.email'|trans}}) }}</p>
{{ form_errors(contactForm.email) }}
<p>{{ form_widget(contactForm.message, {'attr': {'placeholder': 'contact_form.message'|trans}}) }}</p>
{{ form_errors(contactForm.message) }}
<div class="styled-checkbox">
<span class="form-control-wrap checkbox">
<span class="item">
<label>
{{ form_widget(contactForm.privacyPolicyAccepted) }}
<span class="label">
<span>
{{- 'contact_form.accept_terms_text_prefix'|trans -}}
<a href="{{ path('privacy_policy_index') }}" target="_blank">
{{- 'contact_form.accept_terms_text_suffix'|trans -}}
</a>
</span>
</span>
</label>
</span>
</span>
</div>
{{ form_errors(contactForm.privacyPolicyAccepted) }}
<input type="hidden" name="g-recaptcha-response">
<input type="hidden" name="email_repeat">
<input type="hidden" name="form_rendered_at" value="{{ 'now'|date('U') }}">
<p>{{ form_widget(contactForm.send, {
'label': 'common.send'|trans|upper,
'attr': {
'class': 'btn cta-secondary g-recaptcha',
'data-sitekey': google_captcha_site_key,
'data-callback': 'onRecaptchaSubmit',
'data-action': 'submit'
}})
}}</p>
</div>
{{ form_end(contactForm) }}
<a
class="btn cta-primary customer-service-button"
href="https://www.echst.net/?utm_source=icftechnology.com&utm_medium=banner&utm_campaign=icf_redirect"
target="_blank"
>
{{ 'common.customer_service_btn'|trans }}
</a>
</div>
</div>
</div>
</section>