{% set class = class|default('') %}
{% set popup = popup|default(null) %}
<div class="popup-modal-form {{ class }}" data-popup-screen>
<h3 class="popup-modal-form__title">
{{ popup.title }}
</h3>
<div class="popup-modal-form__subtitle text__small text__grey03">
{{ popup.formSubtitle }}
</div>
<div class="popup-modal-form__main">
{{ form_start(form, {
'action': app.request.requestUri,
'attr': {
'class': 'popup-modal-form__form'
}
}) }}
<div class="popup-modal-form__fields">
{% if form.name is defined %}
<div class="popup-modal-form__field form-field">
{{ form_row(form.name) }}
</div>
{% endif %}
{% set phoneIsValid = form.phone.vars.valid %}
<div class="popup-modal-form__field form-field {% if not phoneIsValid %}_has-errors{% endif %}">
{{ form_row(form.phone) }}
</div>
</div>
<div class="popup-modal-form__bottom">
{{ form_row(form.submit, {
'label': 'Заказать консультацию',
'attr': {
'class': 'popup-modal-form__button button',
'data-goal-yandex-submit': settings().successPopupGoal,
'data-goal-vk-submit': settings().successPopupGoal,
'data-submit-button': '',
}
}) }}
{% include '_parts/common/policy-checkbox.html.twig' with {
class: 'popup-modal-form__policy',
id: 'popup-modal'
} %}
</div>
{{ form_end(form) }}
</div>
<div class="popup-modal-form__timer text__mini text__grey03">
<span class="popup-modal-form__timer-text">
До закрытия предложения
</span>
<span class="popup-modal-form__timer-time"
data-timer
data-timeout="{{ popup.timer }}"
></span>
</div>
</div>