{% set class = class|default('') %}
{% set form = form|default(null) %}
{% set actionPath = actionPath|default('') %}
{% set formTitle = settings().formTitle %}
{% set formSubtitle = settings().formSubtitle %}
{% set buttonText = settings().buttonText %}
<div class="layout-modal-form request-form {{ class }}">
<div class="layout-modal-form__inner request-form__data">
<div class="layout-modal-form__headings">
<h3 class="layout-modal-form__title text__black-text">
{{ formTitle }}
</h3>
<div class="layout-modal-form__subtitle text__body">
{{ formSubtitle }}
</div>
</div>
<div class="layout-modal-form__form-wrap">
{{ form_start(form, {
'action': path(actionPath),
'attr': {
'class': 'layout-modal-form__form',
'data-ajax-form': 'true',
'data-success-selector': '.layout-modal-form',
'data-modal-handle-off': '',
'data-goal-yandex-submit': settings().successLayoutGoal,
'data-goal-vk-submit': settings().successLayoutGoal
}
}) }}
<div class="layout-modal-form__form-main">
<div class="layout-modal-form__field form-field">
{{ form_row(form.phone) }}
</div>
{{ form_row(form.submit, {
'label': buttonText,
'attr': {
'class': 'layout-modal-form__button button',
'data-submit-button': '',
}
}) }}
</div>
{% include '_parts/common/policy-checkbox.html.twig' with {
class: 'layout-modal-form__policy',
id: 'layout-recall-modal'
} %}
{{ form_end(form) }}
</div>
</div>
<div class="layout-modal-form__success request-form__success">
<div class="request-form__success-icon-wrap">
{% include "_parts/icons/form-success.svg" %}
</div>
<div class="request-form__success-text-wrap">
<h3 class="request-form__success-title">
Вы успешно оставили заявку
</h3>
<div class="request-form__success-description text__body text__grey03">
Наш менеджер перезвонит вам в ближайшее время
</div>
</div>
</div>
</div>