templates/website/cart/cart-section-user-info.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import ico, switch %}
  2. <div id="cart-info--content" class="cart-info step-container">
  3.     <div class="box-checkout box-checkout-form">
  4.         <div class="titulo-form">
  5.             <h2>{{ getLanguage('information', 'cart') }}</h2>
  6.         </div>
  7.         <form id="formUserInfoCart"
  8.               action="{{ path('userEditInfoCart', { id: user.id }) }}"
  9.               method="PUT"
  10.               class="form-geral"
  11.               data-is-brazil-active="{{ isBrazilDefault? 1:'' }}">
  12.             <input type="hidden" name="no-contracts" value="{{ hasContracts ? '' : true }}">
  13.             <div class="cp-cols">
  14.                 {# IS BRAZILIAN #}
  15.                 <div class="cp cp-pq">
  16.                     <label for="country">{{ getLanguage('am_brazilian', 'util') }}</label>
  17.                     {{ switch({
  18.                         name: 'country',
  19.                         checked: isBrazilDefault,
  20.                         attribs: 'class="isBrazil_infoCart"',
  21.                     })}}
  22.                 </div>
  23.                 {# DOCUMENT #}
  24.                 <div class="cp cp-3">
  25.                     <label for="document" data-country="{{ isBrazilDefault? 1:'' }}">
  26.                         {{ getLanguage('document', 'cart') }}
  27.                         <span class="document-type">&nbsp;(CPF&thinsp;/&thinsp;CNPJ)</span>
  28.                         <em> *</em>
  29.                     </label>
  30.                     <input 
  31.                         id="document"
  32.                         {% if user.country is not null and user.country.id == enum('AbstractEnum::COUNTRY_BRAZIL') %}
  33.                             data-apply-validation="true"
  34.                         {% endif %}
  35.                         class="document mask-cpf-cnpj"
  36.                         type="text" 
  37.                         name="document" value="{{ user.document }}" 
  38.                         required="required"
  39.                         placeholder="{{ getLanguage('type_your_document', 'cart') }}">
  40.                 </div>
  41.                 {# COMPLETE REGISTRATION #}
  42.                 {% if cartCompleteRegistration %}
  43.                     {# ZIP CODE | CEP #}
  44.                     <div class="cp cp-3">
  45.                         <label for="zipCode">{{ getLanguage('zipcode', 'cart') }}<em> *</em></label>
  46.                         <input 
  47.                             id="zipCode"
  48.                             type="text"
  49.                             name="zipCode"
  50.                             value="{{ user.zipCode }}"
  51.                             data-apply-search="true"
  52.                             required="required"
  53.                             placeholder="{{ getLanguage('type_your_zipcode', 'cart') }}"
  54.                         >
  55.                     </div>
  56.                     {# STATE #}
  57.                     <div class="cp cp-3 cp-custom-sel" data-show-brazil>
  58.                         <label for="state">{{ getLanguage('state', 'cart') }}<em> *</em></label>
  59.                         <div class="select-wrap">
  60.                             <select id="state" 
  61.                                     name="state"
  62.                                     request="{{ path('stateList') }}" 
  63.                                     save="{% if user.state %}{{ user.state.id }}{% endif %}"
  64.                                     class="custom-select custom-select--search"
  65.                                     required>
  66.                                 <option state-option value="">
  67.                                     {{ user.state? user.state.name : getLanguage('select_state', 'cart') }}
  68.                                 </option>
  69.                                 <option value="other">{{ getLanguage('other', 'cart') }}</option>
  70.                             </select>
  71.                             <i class="loader">{{ ico('loader-wish') }}</i>
  72.                         </div>
  73.                     </div>
  74.                     {# CITY #}
  75.                     <div class="cp cp-3 cp-custom-sel" data-show-brazil>
  76.                         <label for="city">{{ getLanguage('city', 'cart') }}<em> *</em></label>
  77.                         <div class="select-wrap">
  78.                             <select id="city"
  79.                                     name="city"
  80.                                     request="{{ path('cityList') }}" 
  81.                                     save="{% if user.city %}{{ user.city.id }}{% endif %}"
  82.                                     class="custom-select custom-select--search"
  83.                                     required>
  84.                                 <option city-option value="">
  85.                                     {{ user.city? user.city.name : getLanguage('select_city', 'cart') }}
  86.                                 </option>
  87.                                 <option value="other">{{ getLanguage('other', 'cart') }}</option>
  88.                             </select>
  89.                             <i class="loader">{{ ico('loader-wish') }}</i>
  90.                         </div>
  91.                     </div>
  92.                     {# ADDRESS #}
  93.                     <div class="cp cp-3">
  94.                         <label for="address">{{ getLanguage('address', 'cart') }}<em> *</em></label>
  95.                         <input id="address" type="text" name="address" value="{{ user.address }}" required placeholder="{{ getLanguage('type_your_address', 'cart') }}">
  96.                     </div>
  97.                     {# NUMBER #}
  98.                     <div class="cp cp-3">
  99.                         <label for="addressNumber">
  100.                             {{ getLanguage('number', 'cart') }}
  101.                             <em data-show-brazil> *</em>
  102.                         </label>
  103.                         <input id="addressNumber" type="text" name="addressNumber" value="{{ user.addressNumber }}" required placeholder="{{ getLanguage('type_your_number', 'cart') }}">
  104.                     </div>
  105.                     {# COMPLEMENT #}
  106.                     <div class="cp cp-3">
  107.                         <label for="addressComplement">{{ getLanguage('complement', 'cart') }}</label>
  108.                         <input id="addressComplement" type="text" name="addressComplement" value="{{ user.addressComplement }}" placeholder="{{ getLanguage('type_your_complement', 'cart') }}">
  109.                     </div>
  110.                     {# NEIGHBORHOOD #}
  111.                     <div class="cp cp-3">
  112.                         <label for="addressNeighborhood">{{ getLanguage('district', 'cart') }}<em> *</em></label>
  113.                         <input id="addressNeighborhood" type="text" name="addressNeighborhood" value="{{ user.addressNeighborhood }}" required placeholder="{{ getLanguage('enter_district', 'cart') }}">
  114.                     </div>
  115.                 {% endif %}
  116.                 {# -/ Complete Registration #}
  117.             </div>
  118.         </form>
  119.         {# WARN REQUIRED #}
  120.         <p class="warn-required">{{ getLanguage('required_fields', 'util')|raw }}</p>
  121.     </div>
  122.     <div class="base-acoes">
  123.         <button id="btnUserInfo" type="submit" form="formUserInfoCart" class="btn-continuar-peq btn-load">
  124.             <span>{{ getLanguage('continue', 'cart') }}</span>
  125.             <span>{{ getLanguage('wait', 'util') }}&thinsp;&hellip;&ensp;<i class="loader">{{ ico('loader-wish') }}</i></span>
  126.         </button>
  127.     </div>
  128. </div>