{% from 'utils.html.twig' import ico, switch %}
<div id="cart-info--content" class="cart-info step-container">
<div class="box-checkout box-checkout-form">
<div class="titulo-form">
<h2>{{ getLanguage('information', 'cart') }}</h2>
</div>
<form id="formUserInfoCart"
action="{{ path('userEditInfoCart', { id: user.id }) }}"
method="PUT"
class="form-geral"
data-is-brazil-active="{{ isBrazilDefault? 1:'' }}">
<input type="hidden" name="no-contracts" value="{{ hasContracts ? '' : true }}">
<div class="cp-cols">
{# IS BRAZILIAN #}
<div class="cp cp-pq">
<label for="country">{{ getLanguage('am_brazilian', 'util') }}</label>
{{ switch({
name: 'country',
checked: isBrazilDefault,
attribs: 'class="isBrazil_infoCart"',
})}}
</div>
{# DOCUMENT #}
<div class="cp cp-3">
<label for="document" data-country="{{ isBrazilDefault? 1:'' }}">
{{ getLanguage('document', 'cart') }}
<span class="document-type"> (CPF / CNPJ)</span>
<em> *</em>
</label>
<input
id="document"
{% if user.country is not null and user.country.id == enum('AbstractEnum::COUNTRY_BRAZIL') %}
data-apply-validation="true"
{% endif %}
class="document mask-cpf-cnpj"
type="text"
name="document" value="{{ user.document }}"
required="required"
placeholder="{{ getLanguage('type_your_document', 'cart') }}">
</div>
{# COMPLETE REGISTRATION #}
{% if cartCompleteRegistration %}
{# ZIP CODE | CEP #}
<div class="cp cp-3">
<label for="zipCode">{{ getLanguage('zipcode', 'cart') }}<em> *</em></label>
<input
id="zipCode"
type="text"
name="zipCode"
value="{{ user.zipCode }}"
data-apply-search="true"
required="required"
placeholder="{{ getLanguage('type_your_zipcode', 'cart') }}"
>
</div>
{# STATE #}
<div class="cp cp-3 cp-custom-sel" data-show-brazil>
<label for="state">{{ getLanguage('state', 'cart') }}<em> *</em></label>
<div class="select-wrap">
<select id="state"
name="state"
request="{{ path('stateList') }}"
save="{% if user.state %}{{ user.state.id }}{% endif %}"
class="custom-select custom-select--search"
required>
<option state-option value="">
{{ user.state? user.state.name : getLanguage('select_state', 'cart') }}
</option>
<option value="other">{{ getLanguage('other', 'cart') }}</option>
</select>
<i class="loader">{{ ico('loader-wish') }}</i>
</div>
</div>
{# CITY #}
<div class="cp cp-3 cp-custom-sel" data-show-brazil>
<label for="city">{{ getLanguage('city', 'cart') }}<em> *</em></label>
<div class="select-wrap">
<select id="city"
name="city"
request="{{ path('cityList') }}"
save="{% if user.city %}{{ user.city.id }}{% endif %}"
class="custom-select custom-select--search"
required>
<option city-option value="">
{{ user.city? user.city.name : getLanguage('select_city', 'cart') }}
</option>
<option value="other">{{ getLanguage('other', 'cart') }}</option>
</select>
<i class="loader">{{ ico('loader-wish') }}</i>
</div>
</div>
{# ADDRESS #}
<div class="cp cp-3">
<label for="address">{{ getLanguage('address', 'cart') }}<em> *</em></label>
<input id="address" type="text" name="address" value="{{ user.address }}" required placeholder="{{ getLanguage('type_your_address', 'cart') }}">
</div>
{# NUMBER #}
<div class="cp cp-3">
<label for="addressNumber">
{{ getLanguage('number', 'cart') }}
<em data-show-brazil> *</em>
</label>
<input id="addressNumber" type="text" name="addressNumber" value="{{ user.addressNumber }}" required placeholder="{{ getLanguage('type_your_number', 'cart') }}">
</div>
{# COMPLEMENT #}
<div class="cp cp-3">
<label for="addressComplement">{{ getLanguage('complement', 'cart') }}</label>
<input id="addressComplement" type="text" name="addressComplement" value="{{ user.addressComplement }}" placeholder="{{ getLanguage('type_your_complement', 'cart') }}">
</div>
{# NEIGHBORHOOD #}
<div class="cp cp-3">
<label for="addressNeighborhood">{{ getLanguage('district', 'cart') }}<em> *</em></label>
<input id="addressNeighborhood" type="text" name="addressNeighborhood" value="{{ user.addressNeighborhood }}" required placeholder="{{ getLanguage('enter_district', 'cart') }}">
</div>
{% endif %}
{# -/ Complete Registration #}
</div>
</form>
{# WARN REQUIRED #}
<p class="warn-required">{{ getLanguage('required_fields', 'util')|raw }}</p>
</div>
<div class="base-acoes">
<button id="btnUserInfo" type="submit" form="formUserInfoCart" class="btn-continuar-peq btn-load">
<span>{{ getLanguage('continue', 'cart') }}</span>
<span>{{ getLanguage('wait', 'util') }} … <i class="loader">{{ ico('loader-wish') }}</i></span>
</button>
</div>
</div>