templates/pages/modal/popup/popup-modal-form.html.twig line 1

Open in your IDE?
  1. {% set class = class|default('') %}
  2. {% set popup = popup|default(null) %}
  3. <div class="popup-modal-form {{ class }}" data-popup-screen>
  4.     <h3 class="popup-modal-form__title">
  5.         {{ popup.title }}
  6.     </h3>
  7.     <div class="popup-modal-form__subtitle text__small text__grey03">
  8.         {{ popup.formSubtitle }}
  9.     </div>
  10.     <div class="popup-modal-form__main">
  11.         {{ form_start(form, {
  12.             'action': app.request.requestUri,
  13.             'attr': {
  14.                 'class': 'popup-modal-form__form'
  15.             }
  16.         }) }}
  17.         <div class="popup-modal-form__fields">
  18.             {% if form.name is defined %}
  19.                 <div class="popup-modal-form__field form-field">
  20.                     {{ form_row(form.name) }}
  21.                 </div>
  22.             {% endif %}
  23.             {% set phoneIsValid = form.phone.vars.valid %}
  24.             <div class="popup-modal-form__field form-field {% if not phoneIsValid %}_has-errors{% endif %}">
  25.                 {{ form_row(form.phone) }}
  26.             </div>
  27.         </div>
  28.         <div class="popup-modal-form__bottom">
  29.             {{ form_row(form.submit, {
  30.                 'label': 'Заказать консультацию',
  31.                 'attr': {
  32.                     'class': 'popup-modal-form__button button',
  33.                     'data-goal-yandex-submit': settings().successPopupGoal,
  34.                     'data-goal-vk-submit': settings().successPopupGoal,
  35.                     'data-submit-button': '',
  36.                 }
  37.             }) }}
  38.             {% include '_parts/common/policy-checkbox.html.twig' with {
  39.                 class: 'popup-modal-form__policy',
  40.                 id: 'popup-modal'
  41.             } %}
  42.         </div>
  43.         {{ form_end(form) }}
  44.     </div>
  45.     <div class="popup-modal-form__timer text__mini text__grey03">
  46.         <span class="popup-modal-form__timer-text">
  47.             До закрытия предложения
  48.         </span>
  49.         <span class="popup-modal-form__timer-time"
  50.               data-timer
  51.               data-timeout="{{ popup.timer }}"
  52.         ></span>
  53.     </div>
  54. </div>