src/Aqarmap/Bundle/UserBundle/Resources/views/User/listingMultiStepLeadModal.html.twig line 1

Open in your IDE?
  1. {% set isSurveyEnabled = isEnabledFeature('web.registration.survey') %}
  2. {% set surveyModalId = "RegistrationSurveyModal" %}
  3. {% set user = app.user %}
  4. {% set userName = user ? user.fullname :  '' %}
  5. {% set userEmail = user ? user.email :  '' %}
  6. {% set userPhone = user ? user.phoneNumber :  null %}
  7. {% set formId = "quickLeadWizard" %}
  8. {% set collapseTitle = ''%}
  9. {% set isCompaniesTab = currentTab is defined and currentTab == 'companies' %}
  10. {% set isCompaniesProfile = isCompanyProfile is defined and isCompanyProfile %}
  11. {% if app.request.attributes.get('_route') in ['aqarmap_agents_search', 'aqarmap_agents_search_with_location', 'aqarmap_user_listings'] %}
  12.     {% if isCompaniesTab or isCompaniesProfile %}
  13.         {% set collapseTitle = 'agents_search_page.company_user_lead_message'|trans %}
  14.     {% else %}
  15.         {% set collapseTitle = 'agents_search_page.agent_user_lead_message'|trans %}
  16.     {% endif %}
  17. {% else %}
  18.     {% set collapseTitle = 'listing.contact_seller_lead'|trans %}
  19. {% endif %}
  20. <div class="modal bd-example-modal-lg countryCode quick-lead-modal small easy-access modal-box px-0" id="quick-lead-modal" tabindex="-1" role="dialog" {% if app.user %} ng-init="setLoggedInUser({
  21.                                             'name': '{{ userName }}',
  22.                                             'email': '{{ userEmail }}',
  23.                                             'phone': '{{ userPhone }}',
  24.                                             {# 'countryCode': '{{ user.mainNumber.phone.countryCode }}' #}
  25.                                             })" {% else %} ng-init="setLoggedInUser(null)" {% endif %}>
  26.     <div class="modal-dialog" role="document">
  27.         <div class="modal-content modal-lg  modal-box__content">
  28.             <div class="modal-box__header modal-box__header_borderd-sm-0 modal-lg ">
  29.                 <span class="modal-box__title d-md-block d-none">
  30.                     {{collapseTitle}}
  31.                 </span>
  32.                 <button type="button" class="modal-close modal-box__close" ng-click="cancelQuickLead('{{isSurveyEnabled}}' , '{{surveyModalId}}')" data-dismiss="modal">
  33.                     <img src="/images/close_dark_gray.svg" width="24" height="24"/>
  34.                 </button>
  35.             </div>
  36.             <div class="modal-box__body modal-box__body_pt-sm-0 ">
  37.                 <form class="wizard-form" id="{{formId}}" ng-init="setFormId('{{formId}}')">
  38.                     <div class="modal-listing-contact">
  39.                         <div class="full-height">
  40.                             <div class="col-xs-12 contact-container full-height" ng-init="setAutoGeneratedEmailStatus({{ isEnabledFeature('web.small.registration') }})">
  41.                                 <input type="hidden" ng-init="formData.quickRegistrationSource='multi-step';"/>
  42.                                 <div class="form-group wizard-form__group wizard-form__step" step="1" gtm-action="gtm-action-quick-register-name-skipped" gtm-step="name">
  43.                                     {% set namePlaceholder = 'layout.static_placeholders.name_placeholder'|trans %}
  44.                                     <div class="form-group wizard-form__group">
  45.                                         <p class="wizard-form__label">{{ 'popup_form.enter_name'|trans }}</p>
  46.                                         <input class="form-control wizard-form__input" type="text" id="lead_name" ng-model="formData['fullName']" ng-init="formData['fullName']='{{userName}}';" minlength="3" placeholder="{{namePlaceholder}}" wizard-input-name="fullName">
  47.                                         <span class="text-danger name-error formError"></span>
  48.                                     </div>
  49.                                 </div>
  50.                                 <div class="form-group wizard-form__group wizard-form__step" step="2" gtm-action="gtm-action-quick-register-email-skipped" gtm-step="email">
  51.                                     <p class="wizard-form__label wizard-form__label_sub-label">{{ 'popup_form.last_step'|trans }}</p>
  52.                                     <p class="wizard-form__label">{{ 'popup_form.enter_email'|trans }}</p>
  53.                                     <input class="form-control wizard-form__input" type="email" placeholder="email@domain.com" id="lead_email" ng-model="formData['email']" ng-init="formData['email']='{{userEmail}}';" wizard-input-name="email">
  54.                                     <span class="text-danger email-error formError"></span>
  55.                                 </div>
  56.                                 <div class="form-group wizard-form__group wizard-form__step" step="0" gtm-step="phone_number">
  57.                                     {% set phonePlaceholder = 'popup_form.register_popup_phone_number'|trans ~ '*' %}
  58.                                     <p class="wizard-form__label">{{ 'popup_form.enter_number'|trans }}</p>
  59.                                     <div class="form-group wizard-form__group">
  60.                                         <input class="form-control phone wizard-form__input" type="text" inputmode="numeric" placeholder="{{phonePlaceholder}}" id="lead_phone" ng-model="formData['phone[number]']" ng-init="formData['phone[number]'] = '{{userPhone}}'" minlength="7" maxlength="15" wizard-input-name="phone[number]">
  61.                                         <span class="text-danger phone-error formError"></span>
  62.                                     </div>
  63.                                     <input hidden ng-model="formData['phone[country_code]']" type="text" id="leadCountryCode" class="form-control" name="lead[countryCode]"/>
  64.                                 </div>
  65.                             </div>
  66.                         </div>
  67.                     </div>
  68.                     <div class="modal-box__footer modal-box__footer_sm-borderless text-center">
  69.                         <div class="wizard-action w-100">
  70.                             <div class="form-group wizard-form__group mb-0 mx-auto w-100 wizard-form__next-btn wizard-form__btn ">
  71.                                 <button ng-click="submitWizard('next')" class="btn btn-block rounded-pill btn-primary cta-btn">
  72.                                     {{ 'popup_form.submit'|trans }}</button>
  73.                             </div>
  74.                             <div class="form-group wizard-form__group lead-submit mb-0 mx-auto w-100">
  75.                                 <button ng-click="submitWizard()" class="custom-collapse_btn-submit wizard-form__submit-btn wizard-form__btn btn-submit btn btn-block rounded-pill btn-primary cta-btn"></button>
  76.                             </div>
  77.                         </div>
  78.                     </div>
  79.                 </form>
  80.             </div>
  81.         </div>
  82.     </div>
  83. </div>