{% extends app.request.xmlHttpRequest ? 'ajax.html.twig' : 'base.html.twig' %}
{% block content %}
{% set title = title|default('Заказать звонок') %}
{% set subtitle = subtitle|default('') %}
<div class="recall-modal">
<div class="recall-modal__heading">
{% if title %}
<h3 class="recall-modal__title">
{{ title }}
</h3>
{% endif %}
{% if subtitle %}
<div class="recall-modal__subtitle">
{{ subtitle }}
</div>
{% endif %}
</div>
{{ form_start(form, {
'action': app.request.requestUri,
'attr': {
'class': 'recall-modal__form'
}
}) }}
<div class="recall-modal__fields">
{% if form.name is defined %}
<div class="recall-modal__field form-field">
{{ form_row(form.name) }}
</div>
{% endif %}
{% if form.first_pay is defined %}
<div class="recall-modal__field form-field">
{{ form_row(form.first_pay) }}
</div>
{% endif %}
{% set phoneIsValid = form.phone.vars.valid %}
<div class="recall-modal__field form-field {% if not phoneIsValid %}_has-errors{% endif %}">
{{ form_row(form.phone) }}
</div>
</div>
<div class="recall-modal__bottom">
{% include '_parts/common/policy-checkbox.html.twig' with {
class: 'recall-modal__policy',
id: 'recall-modal'
} %}
{{ form_row(form.submit, {
'label': 'Отправить',
'attr': {
'class': 'recall-modal__button button',
'data-submit-button': '',
}
}) }}
</div>
{{ form_end(form) }}
</div>
{% endblock %}