{% import 'common/macros/elements.html.twig' as elements %}
{% import 'common/macros/forms.html.twig' as forms %}
{% set lang = app.session.get('locale')|default('en') %}
{% set formLang = lang == 'hu' ? 'hu-HU' : 'en-US' %}
<section id="apply-form" class="application-form section">
<div class="wrap">
<div class="section-header">
{{ elements.heading('common.application'|trans|upper, 4, 'section-category') }}
{{ elements.heading('careers.fill_out_the_application_form'|trans, 2, 'section-title') }}
</div>
<div class="contact-form">
<div role="form" lang="{{ formLang }}" dir="ltr">
{{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }}
{{ form_widget(form._token) }}
{{ form_errors(form) }}
<p>{{ form_widget(form.name, {'attr': {'placeholder': 'contact_form.your_name'|trans}}) }}</p>
{{ form_errors(form.name) }}
<p>{{ form_widget(form.email, {'attr': {'placeholder': 'contact_form.email'|trans}}) }}</p>
{{ form_errors(form.email) }}
<p>{{ form_widget(form.coverLetter, {'attr': {'placeholder': 'careers.cover_letter'|trans}}) }}</p>
{{ form_errors(form.coverLetter) }}
<div class="file-upload">
<span class="label">{{ 'careers.cv'|trans }}</span>
<br>
<span class="input">
<br>
<span class="form-control-wrap">
{{ form_widget(form.cvFile, { 'id': 'fileupload' }) }}
</span>
<br>
</span>
<br>
<div class="upload-button">
<label for="fileupload">
<br>
<span class="upload-button-label">{{ 'common.upload'|trans|upper }}</span>
<br>
<span class="upload-button-file">{{ 'common.no_file_selected'|trans }}</span>
</label>
<br>
<div class="remove">x</div>
</div>
</div>
{{ form_errors(form.cvFile) }}
<div class="styled-checkbox">
<span class="form-control-wrap checkbox">
<span class="item">
<label>
{{ form_widget(form.privacyPolicyAccepted) }}
<span class="label">
{{ 'contact_form.accept_terms_text_prefix'|trans }}
<a href="{{ path('privacy_policy_index') }}" target="_blank">
{{ 'contact_form.accept_terms_text_suffix'|trans }}
</a>
</span>
</label>
</span>
</span>
</div>
{{ form_errors(form.privacyPolicyAccepted) }}
<input type="hidden" name="g-recaptcha-response">
<input type="text" name="email_repeat" style="display: none;">
<input type="hidden" name="form_rendered_at" value="{{ 'now'|date('U') }}">
<p>{{ form_widget(form.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>
{{ form_end(form) }}
</div>
<div class="form-extra">
<p>
{{ 'careers.fine_print_prefix'|trans ~ ' ' }}
<a href="{{ path('home_index') ~ '#get-in-touch' }}">{{ 'careers.fine_print_suffix'|trans }}</a>
.
</p>
</div>
</div>
</div>
</section>