<label class="ftr-field">
	<input type="text" id="firstname" name="firstname" class="ftr-field__entry ftr-js-field__entry" value="{{ firstname }}" required>
	<span class="ftr-field__text">{{ entry_firstname }}</span>
</label>
<label class="ftr-field">
	<input type="text" id="lastname" name="lastname" class="ftr-field__entry ftr-js-field__entry" value="{{ lastname }}" required>
	<span class="ftr-field__text">{{ entry_lastname }}</span>
</label>

<label class="ftr-field {{ (error_postcode) ? 'error' : '' }}">
  <input type="text" id="postcode" name="postcode" class="ftr-field__entry ftr-js-field__entry mask-cep js-postcode-search postcode" value="{{ postcode }}" maxlength="10" required>
  <span class="ftr-field__text">{{ entry_postcode }}</span>
</label>
{{ dont_know_cep }}
<div class="js-postcode-content ftr-h--full ftr-none">
	<label class="ftr-field">
		<input type="text" id="apelido" name="apelido" class="ftr-field__entry ftr-js-field__entry" value="{{ apelido }}">
		<span class="ftr-field__text">{{ entry_place }}</span>
	</label>
	<label class="ftr-field">
		<input type="text" id="address_1" name="address_1" class="ftr-field__entry ftr-js-field__entry address_1" value="{{ address_1 }}" required>
		<span class="ftr-field__text">{{ entry_address_1 }}</span>
		<input type="hidden" class="tipo_logradouro" name="tipo_logradouro" value="">
		<input type="hidden" class="logradouro" name="logradouro" value="">
		<input type="hidden" class="city" name="city" value="">
	</label>
	<label class="ftr-field">
		<input type="number" id="numero" name="numero" class="ftr-field__entry ftr-js-field__entry" value="{{ numero }}" required>
		<span class="ftr-field__text">{{ entry_numero }}</span>
	</label>
	<label class="ftr-field">
		<input type="text" id="complemento" name="complemento" class="ftr-field__entry ftr-js-field__entry" value="{{ complemento }}">
		<span class="ftr-field__text">{{ entry_complemento }}</span>
	</label>
	<label class="ftr-field">
		<input type="text" id="address_2" name="address_2" class="ftr-field__entry ftr-js-field__entry address_2" value="{{ address_2 }}" required>
		<span class="ftr-field__text">{{ entry_address_2 }}</span>
	</label>

	<input type="hidden" name="country_id" value="{{ country_id }}">
  <label for="zone_id" class="ftr-select ftr-js-select {{ (zone_name) ? 'written' : '' }} {{ (postcode_readonly) ? 'ftr-select--disabled ftr-js-select--disabled written' : '' }}">
    <input class="ftr-select__entry ftr-js-select__entry" type="text" name="" value="{{ zone_name }}" id="zone_id" disabled readonly>
    <input class="js-city-search ftr-js-select__value ftr-hidden zone_id" name="zone_id" value="{{ zone_id }}" data-codigo-municipio="{{ codigo_municipio }}" required>
    <span class="ftr-select__text">{{ entry_zone }}</span>
    <div class="ftr-select__content">
      {% for state in states %}
        <span class="ftr-select__content__item ftr-js-select__content__item ftr-js-ripple-effect" data-value="{{ state.zone_id }}" {{ (state.zone_id == zone_id) ? 'data-selected="true"' : '' }}>{{ state.name }}</span>
      {% endfor %}
    </div>
  </label>

  <label for="codigo_municipio" class="ftr-select ftr-js-select {{ (codigo_municipio) ? 'written' : '' }} {{ (postcode_readonly) ? 'ftr-select--disabled ftr-js-select--disabled written' : '' }}">
    <input class="ftr-select__entry ftr-js-select__entry city-name" type="text" name="" value="{{ city }}" disabled readonly>
    <input class="ftr-js-select__value ftr-hidden codigo-municipio codigo_municipio" name="codigo_municipio" value="{{ codigo_municipio }}" required>
    <span class="ftr-select__text">{{ entry_city }}</span>
    <div class="ftr-select__content cities-list"></div>
  </label>
</div>
<script>
  if (typeof loadSpecificSources != 'undefined') {
    loadSpecificSources({
      scripts: {{ scriptsApp }}
    });
  }
</script>
