templates/website/user/userInfoCheckout/user-info-checkout-modal.html.twig line 1

Open in your IDE?
  1. {# MODAL -- USER INFO CHECKOUT #}
  2. {% embed "website/includes/modal.html.twig" with {
  3.     'id': 'modal-user-info-checkout',
  4.     'title': getLanguage('add_billing_data', 'profile'),
  5.     'classes': 'modal-wid',
  6. }%}
  7.     {% from 'utils.html.twig' import switch, ico %}
  8.       {# IS BRAZIL #}
  9.     {% set isBrazilSetup = (getConfig('checkout_default_region') == '1')? false : true %}
  10.     {% block title %}
  11.         <h3>
  12.             <span data-mode-show="create">{{ getLanguage('title_add_new', 'modals') }}</span>
  13.             <span data-mode-show="edit">{{ getLanguage('title_edit', 'modals') }}</span>
  14.             <span data-mode-show="fix">{{ getLanguage('title_complete', 'modals') }}</span>
  15.         </h3>
  16.     {% endblock %}
  17.     {% block content %}
  18.         <form 
  19.             id="formUserInfoCheckout"
  20.             class="form-geral"
  21.             data-keep-validator="true"
  22.             data-is-brazil-default="{{ isBrazilSetup? 1 : 0 }}"
  23.             data-is-brazil-active="{{ isBrazilSetup? 1 : 0 }}"
  24.             data-save-action="{{ path('registerUserCheckoutInfo') }}" 
  25.             data-edit-action="{{ path('editUserCheckoutInfo', { id: null }) }}" 
  26.             data-save-method="POST"
  27.             data-edit-method="PUT">
  28.             <div class="cp-cols">
  29.                 {# NAME #}
  30.                 <div class="cp cp-2">
  31.                     <label for="fatura-name">
  32.                         {{ getLanguage('name', 'profile') }}
  33.                         <em> *</em>
  34.                     </label>
  35.                     <input type="text" id="fatura-name" name="name" placeholder="{{ getLanguage('name_or_company', 'profile') }}" required autofocus="autofocus" maxlength="70">
  36.                 </div>
  37.                 {# EMAIL #}
  38.                 <div class="cp cp-2">
  39.                     <label for="fatura-email">
  40.                         E-mail
  41.                         <em> *</em>
  42.                     </label>
  43.                     <input type="email" id="fatura-email" name="email" placeholder="{{ getLanguage('enter_an_email', 'profile') }}" required autofocus="autofocus" maxlength="70">
  44.                 </div>
  45.                 {# PHONE #}
  46.                 <div class="cp cp-4 cp-gd">
  47.                     <label for="fatura-telephone">
  48.                         {{ getLanguage('phone', 'profile') }}
  49.                         <em> *</em>
  50.                     </label>
  51.                     <input id="fatura-telephone" type="text" class="intlPhone" name="phone" required>
  52.                 </div>
  53.                 {# IS BRAZILIAN #}
  54.                 <div class="cp cp-pq">
  55.                     <label for="fatura-country">{{ getLanguage('am_brazilian', 'util') }}</label>
  56.                     {{ switch({
  57.                         name: 'country',
  58.                         id: 'fatura-country',
  59.                         checked: isBrazilSetup,
  60.                         attribs: 'class="isBrazil_fatura"',
  61.                     })}}
  62.                 </div>
  63.                 {# DOCUMENT #}
  64.                 <div class="cp cp-2">
  65.                     <label for="fatura-document" data-country="{{ isBrazilSetup? 1:'' }}">
  66.                         {{ getLanguage('document', 'profile') }}<span class="document-type">&nbsp;(CPF&thinsp;/&thinsp;CNPJ)</span>
  67.                         <em> *</em>
  68.                     </label>
  69.                     <input id="fatura-document" type="text" name="document" required>
  70.                 </div>
  71.                 {# ////// ADDRESS ////// #}
  72.                 {# ZIP CODE | CEP #}
  73.                 <div class="cp cp-3">
  74.                     <label for="fatura-zipCode">
  75.                         {{ getLanguage('zipcode', 'profile') }}
  76.                         {% if reqAddress %}<em> *</em>{% endif %}
  77.                     </label>
  78.                     <input id="fatura-zipCode" type="text" name="zipCode" {{ reqAddress? 'required' }} placeholder="{{ getLanguage('enter_zip_code', 'profile') }}">
  79.                 </div>
  80.                 {# STATE #}
  81.                 <div class="cp cp-3" data-show-brazil>
  82.                     <label for="fatura-state">
  83.                         {{ getLanguage('state', 'profile') }}
  84.                         {% if reqAddress %}<em> *</em>{% endif %}
  85.                     </label>
  86.                     <div class="select-wrap">
  87.                         <select id="fatura-state"
  88.                                 name="state" 
  89.                                 request="{{ path('stateList') }}" 
  90.                                 save=""
  91.                                 class="custom-select custom-select--search"
  92.                                 {{ reqAddress? 'required' }}>
  93.                             <option value="">{{ getLanguage('select_state', 'profile') }}</option>
  94.                             <option value="other">{{ getLanguage('other', 'profile') }}</option>
  95.                         </select>
  96.                         <i class="loader">{{ ico('loader-wish') }}</i>
  97.                     </div>
  98.                 </div>
  99.                 {# CITY #}
  100.                 <div class="cp cp-3" data-show-brazil>
  101.                     <label for="fatura-city">
  102.                         {{ getLanguage('city', 'profile') }}
  103.                         {% if reqAddress %}<em> *</em>{% endif %}
  104.                     </label>
  105.                     <div class="select-wrap">
  106.                         <select id="fatura-city"
  107.                                 name="city" 
  108.                                 request="{{ path('cityList') }}"
  109.                                 save=""
  110.                                 class="custom-select custom-select--search"
  111.                                 {{ reqAddress? 'required' }}>
  112.                             <option value="">{{ getLanguage('select_city', 'profile') }}</option>
  113.                             <option value="other">{{ getLanguage('other', 'profile') }}</option>
  114.                         </select>
  115.                         <i class="loader">{{ ico('loader-wish') }}</i>
  116.                     </div>
  117.                 </div>
  118.                 {# ADDRESS #}
  119.                 <div class="cp cp-3-2">
  120.                     <label for="fatura-address">
  121.                         {{ getLanguage('address', 'profile') }}
  122.                         {% if reqAddress %}<em data-show-brazil> *</em>{% endif %}
  123.                     </label>
  124.                     <input id="fatura-address" type="text" name="address" {{ reqAddress? 'required' }} placeholder="{{ getLanguage('type_your_address', 'profile') }}">
  125.                 </div>
  126.                 {# NUMBER #}
  127.                 <div class="cp cp-3">
  128.                     <label for="fatura-addressNumber">
  129.                         {{ getLanguage('number', 'profile') }}
  130.                         {% if reqAddress %}<em data-show-brazil> *</em>{% endif %}
  131.                     </label>
  132.                     <input id="fatura-addressNumber" type="text" name="addressNumber" class="mask-digits" {{ reqAddress? 'required' }} placeholder="{{ getLanguage('type_your_number', 'profile') }}">
  133.                 </div>
  134.                 {# COMPLEMENT #}
  135.                 <div class="cp cp-2">
  136.                     <label for="fatura-addressComplement">{{ getLanguage('complement', 'profile') }}</label>
  137.                     <input id="fatura-addressComplement" type="text" name="addressComplement" placeholder="{{ getLanguage('type_your_complement', 'profile') }}" maxlength="110">
  138.                 </div>
  139.                 {# NEIGHBORHOOD #}
  140.                 <div class="cp cp-2">
  141.                     <label for="fatura-addressNeighborhood">
  142.                         {{ getLanguage('district', 'profile') }}
  143.                         {% if reqAddress %}<em> *</em>{% endif %}
  144.                     </label>
  145.                     <input id="fatura-addressNeighborhood" type="text" name="addressNeighborhood" {{ reqAddress? 'required' }} placeholder="{{ getLanguage('enter_district', 'profile') }}" maxlength="60">
  146.                 </div>
  147. {# ////////////////////////////////////////////// #}
  148.                 {# RECEIVE EMAIL #}
  149.                 <div class="cp cp-br">
  150.                     <label>
  151.                         <input type="checkbox" id="receiveEmail" name="receiveEmail" checked>
  152.                         {{ getLanguage('receive_email', 'profile') }}
  153.                     </label>
  154.                 </div>
  155.             </div>
  156.             <nav class="actions">
  157.                 <button type="button" class="js--modal-fecha cancel">{{ getLanguage('cancel', 'profile') }}</button>
  158.                 <button type="submit" id="btnSaveUserInfoCheckout" class="btn-continuar-peq btn-load">
  159.                     <span id="modalInfoCheckoutBtnLabel">{{ getLanguage('save', 'modals')|upper }}</span>
  160.                     <span>{{ getLanguage('wait', 'util') }}&thinsp;&hellip;&ensp;<i class="loader">{{ ico('loader-wish') }}</i></span>
  161.                 </button>
  162.             </nav>
  163.         </form>
  164.     {% endblock %}
  165. {% endembed %}