templates/_parts/footer/footer-form.html.twig line 1

Open in your IDE?
  1. {% set form = get_recall_form() %}
  2. {% set class = class|default("") %}
  3. <div class="request-form request-form_{{ class }}"> {# <- Вот сюда будет добавлен класс success, когда форма успешно уйдет #}
  4.     <div class="request-form__data">
  5.         {{ form_start(form, {
  6.             'action': path('request:recall'),
  7.             'attr': {
  8.                 'class': 'inline-form__form',
  9.                 'data-ajax-form': 'true',
  10.                 'data-success-selector': '.request-form',
  11.                 'data-goal-yandex-submit': settings().successGoal,
  12.                 'data-goal-vk-submit': settings().successGoal
  13.             }
  14.         }) }}
  15.         <div class="inline-form__field-wrap text__body">
  16.             {% if form.name is defined %}
  17.                 <div class="inline-form__field text__body form-field">
  18.                     {{ form_row(form.name) }}
  19.                 </div>
  20.             {% endif %}
  21.             {% set phoneIsValid = form.phone.vars.valid %}
  22.             <div class="inline-form__field text__body form-field {% if not phoneIsValid %}_has-errors{% endif %}">
  23.                 {{ form_row(form.phone) }}
  24.             </div>
  25.         </div>
  26.         <div class="{{ class }}__submit-policy-wrap">
  27.             {{ form_widget(form.submit, {
  28.                 'attr': {
  29.                     'class': 'inline-form__submit',
  30.                     'data-submit-button': '',
  31.                 }
  32.             }) }}
  33.             <div class="footer__policy-wrap">
  34.                 {% include '_parts/common/policy-checkbox.html.twig' with {
  35.                     class: 'footer__policy',
  36.                     id: 'footer-recall'
  37.                 } %}
  38.             </div>
  39.         </div>
  40.         {{ form_end(form) }}
  41.     </div>
  42.     <div class="request-form__success">
  43.         <div class="request-form__success-icon-wrap">
  44.             {% include "_parts/icons/form-success.svg" %}
  45.         </div>
  46.         <div class="request-form__success-text-wrap">
  47.             <div class="request-form__success-title h2">
  48.                 Вы успешно оставили заявку
  49.             </div>
  50.             <div class="request-form__success-description text__main text__grey03">
  51.                 Наш менеджер свяжется с вами в ближайшее время
  52.             </div>
  53.         </div>
  54.     </div>
  55. </div>