{{ header }}
<header class="background-white bottom-margin-large">
  <div class="container-fluid">
    <div class="row no-space-xs">
      <div class="col-xs-12">
        <div class="content-box vertical-padding-large flex between-xs middle-xs">
          <div>
            <span class="text-x-large text-dark">{{ heading_title }}</span>
            <div class="adm-breadcrumb">
              {% for breadcrumb in breadcrumbs %}
                <i class="fas fa-angle-right text-x-small text-gray horizontal-padding-small"></i>
                <a href="{{ breadcrumb.href }}" class="text-x-small text-gray text-decoration-none">{{ breadcrumb.text }}</a>
              {% endfor %}
            </div>
          </div>
          <div class="flex flex-row middle-xs">
            <a href="{{ cancel }}" class="btn-default btn-medium btn-outline right-margin-small">
              <span>{{ button_cancel }}</span>
            </a>
            <button class="btn-default btn-medium btn-primary js-submit-main-form">
              <span>{{ button_save }}</span>
            </button>
          </div>
          {% if error_warning %}<div class="warning full-width top-margin-medium">{{ error_warning }}</div>{% endif %}
        </div>
      </div>
    </div>
  </div>
</header>
<div class="container-fluid">
  <form action="{{ action }}" method="post" class="row js-main-form">
    <div class="col-xs-12 col-md-6">
      <div class="content-box background-white padding-large shadow-small">
        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_descricao }}</span>
          <input type="text" name="intelipost_descricao" value="{{ intelipost_descricao }}" class="field-entry" >
          {% if error_intelipost_descricao %}
            <span class="error">{{ error_intelipost_descricao }}</span>
          {% endif %}
        </label>
        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_api_key }}</span>
          <input class="field-entry" type="text" name="intelipost_api_key" value="{{ intelipost_api_key }}" >
          {% if error_intelipost_api_key %}
            <span class="error">{{ error_intelipost_api_key }}</span>
          {% endif %}
        </label>
        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_cep_origem }}</span>
          <input type="text" name="intelipost_cep_origem" value="{{ intelipost_cep_origem }}" class="field-entry numeric mask-cep" >
          {% if error_intelipost_cep_origem %}
            <span class="error">{{ error_intelipost_cep_origem }}</span>
          {% endif %}
        </label>

        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_valor_extra }}</span>
          <div class="field-entry-group">
            <select class="field-entry field-entry-medium js-sort-by-option" name="intelipost_tipo_valor_extra">
              {% for intelipost_tp_valor in intelipost_tipo_valor_extra_list %}
              <option value="{{ intelipost_tp_valor.key }}" {{ intelipost_tp_valor.selected }}>{{ intelipost_tp_valor.value }}</option>
              {% endfor %}
            </select>
            <input type="text" name="intelipost_valor_extra" value="{{ intelipost_valor_extra }}" class="field-entry mask-money" >
          </div>
        </label>

        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_prazo_extra }}</span>
          <input type="text" name="intelipost_prazo_extra" value="{{ intelipost_prazo_extra }}" class="field-entry numeric" >
        </label>

        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_tipo_cotacao }}</span>
          <select class="field-entry field-entry-medium js-sort-by-option" name="intelipost_tipo_cotacao">
            {% for tipo_cotacao in intelipost_tipo_cotacao_list %}
            <option value="{{ tipo_cotacao.key }}" {{ tipo_cotacao.selected }}>{{ tipo_cotacao.value }}</option>
            {% endfor %}
          </select>
        </label>

        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_sort_order }}</span>
          <input type="text" name="intelipost_sort_order" value="{{ intelipost_sort_order }}" class="field-entry numeric">
        </label>

        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_geo_zone_id }}</span>
          <select class="field-entry field-entry-medium js-sort-by-option" name="intelipost_geo_zone_id">
            <option value="0">{{text_all_zones}}</option>
            {% for geo_zone in intelipost_geo_zones %}
                {% if geo_zone.geo_zone_id == intelipost_geo_zone_id %}
                <option value="{{geo_zone.geo_zone_id}}" selected="selected">{{geo_zone.name}}</option>
                {% else %}
                <option value="{{geo_zone.geo_zone_id}}">{{geo_zone.name}}</option>
                {% endif %}
            {% endfor %}
          </select>
        </label>

        <label class="field field-medium bottom-margin-medium">
          <span class="field-label">{{ entry_intelipost_status }}</span>
          <select class="field-entry field-entry-medium js-sort-by-option" name="intelipost_status">
            {% for intelipost_status in status_intelipost_list %}
            <option value="{{ intelipost_status.key }}" {{ intelipost_status.selected }}>{{ intelipost_status.value }}</option>
            {% endfor %}
          </select>
        </label>


      </div>
    </div>
  </form>
</div>
{{ form }}
{{ footer }}
