{{ 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="http://manual.futurasistemas.com.br/manual-do-sistema/como-configurar-o-modulo-de-pagamento-itaushopline/"
              class="text-info visible-inline-block cursor-pointer text-decoration-none vertical-padding-small right-margin-large"
              target="_blank"
            >
              <span>{{ button_help }}</span>
            </a>
            <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>
        </div>
        {% if error_warning %}
          <div class="warning full-width">{{ error_warning }}</div>
        {% endif %}
      </div>
    </div>
  </div>
</header>
<div class="container-fluid">
  <form action="{{ action }}" class="form-control-ex js-main-form" method="post">
    <div class="row">
      <div class="col-xs-12 col-md-8">
        <div class="background-white padding-large bottom-margin-medium shadow-small">
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_title }}</span>
            <input class="field-entry" type="text" name="itaushopline_nome" value="{{ not itaushopline_nome is defined ? 'Itáu Pagamentos Online' : itaushopline_nome }}" size='40' />
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label required">{{ entry_cnpj }}</span>
            <input class="field-entry mask-cnpj" type="text" name="itaushopline_cnpj" maxlength="26" value="{{ itaushopline_cnpj }}" size='60' />
            {% if error_itaushopline_cnpj %}
              <span class="text-error text-x-small">{{ error_itaushopline_cnpj }}</span>
            {% endif %}
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label required">{{ entry_cod_empresa }}</span>
            <input class="field-entry" type="text" name="itaushopline_afiliacao" maxlength="26" value="{{ itaushopline_afiliacao }}" size='60' placeholder="26 digitos" />
            {% if error_itaushopline_afiliacao %}
              <span class="text-error text-x-small">{{ error_itaushopline_afiliacao }}</span>
            {% endif %}
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label required">{{ entry_key }}</span>
            <input class="field-entry" type="text" name="itaushopline_chave" maxlength="16" value="{{ itaushopline_chave }}" size="60" placeholder="16 digitos" />
            {% if error_itaushopline_chave %}
              <span class="text-error text-x-small">{{ error_itaushopline_chave }}</span>
            {% endif %}
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label required">{{ entry_expire_days }}</span>
            <input class="field-entry mask-number" type="text" name="itaushopline_dias" value="{{ not itaushopline_dias is defined ? 5 : itaushopline_dias }}" />
            {% if error_itaushopline_dias %}
              <span class="text-error text-x-small">{{ error_itaushopline_dias }}</span>
            {% endif %}
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_wainting_days }}</span>
            <input class="field-entry mask-number" type="text" name="itaushopline_dias_cancelamento_naolocalizado" value="{{ itaushopline_dias_cancelamento_naolocalizado }}" />
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_minimum_value }}</span>
            <input class="field-entry mask-money" type="text" name="itaushopline_minimo" value="{{ itaushopline_minimo }}" size="10" />
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_tipo_finalizacao }}</span>
            <span class="text-x-small text-gray">{{ entry_tipo_finalizacao_obs }}</span>
            <select class="field-entry" name="itaushopline_tipo_finalizacao">
              {% for key, tipo_finalizacao in Type_ItauShoplineTipoFinalizacao.getEnumList() %}
                <option value="{{ key }}" {{ ftr_geral.isSelected(key, itaushopline_tipo_finalizacao) }}>{{ tipo_finalizacao }}</option>
              {% endfor %}
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_order_status_posterior }}</span>
            <span class="text-x-small text-gray">{{ entry_order_status_posterior_obs }}</span>
            <select class="field-entry" name="itaushopline_order_status_posterior_id" id="itaushopline_order_status_posterior_id" >
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == itaushopline_order_status_posterior_id ? 'selected="selected"' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_order_status_posterior_link }}</span>
            <span class="text-x-small text-gray">{{ entry_order_status_posterior_link_obs }}</span>
            <select class="field-entry" name="itaushopline_order_status_posteriorlink_id" id="itaushopline_order_status_posteriorlink_id" >
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == itaushopline_order_status_posteriorlink_id ? 'selected="selected"' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_wainting_payment }}</span>
            <select class="field-entry" name="itaushopline_padrao">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == itaushopline_padrao ? 'selected="selected"' : '' }}>
                {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_paid_payment }}</span>
            <select class="field-entry" name="itaushopline_pago">
              {% for order_status in order_statuses %}
              <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == itaushopline_pago ? 'selected="selected"' : '' }}>
                {{ order_status.name }}
              </option>
              {% endfor %}
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_canceled_payment }}</span>
            <select class="field-entry" name="itaushopline_cancelado">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == itaushopline_cancelado ? 'selected="selected"' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <div class="bottom-padding-large">
            <div class="visible-block">
              <span class="text-small text-dark text-bold">{{ entry_probe_link }}</span>
              <span class="text-x-small text-gray">{{ entry_probe_link_obs }}</span>
            </div>
            <span class="js-copy-content text-small text-gray">{{ cron|replace({'/admin/':'/'}) }}</span>
            <span class="js-copy-action text-medium rel">
              <i class="far fa-clone" aria-hidden="true" title="Copiar"></i>
            </span>
          </div>
          <div>
            <div class="visible-block">
              <span class="text-small text-dark text-bold">{{ entry_return_url }}</span>
              <span class="text-x-small text-gray">{{ entry_return_url_obs }}</span>
            </div>
            <span class="js-copy-content text-small text-gray">{{ retorno|replace({'/admin/':'/'}) }}</span>
            <span class="js-copy-action text-medium rel">
              <i class="far fa-clone" aria-hidden="true" title="Copiar"></i>
            </span>
          </div>
        </div>
      </div>
      <div class="col-xs-12 col-md-4">
        <div class="background-white padding-large bottom-margin-medium shadow-small">
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_status }}</span>
            <select class="field-entry" name="itaushopline_status">
              <option value="1" {{ itaushopline_status ?'selected="selected"' : '' }}>{{ text_active }}</option>
              <option value="0" {{ itaushopline_status ?'' : 'selected="selected"' }}>{{ text_inactive }}</option>
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_display }}</span>
            <select class="field-entry" name="itaushopline_display" >
              {% for key, display in Type_DisplayModuleOption.getRemoveArray([Type_DisplayModuleOption.Tp_Aplicativo, Type_DisplayModuleOption.Tp_Todos]) %}
                <option value="{{ key }}" {{ ftr_Geral.isSelected(key, itaushopline_display, Type_DisplayModuleOption.Tp_Ecommerce) }}>{{ display }}</option>
              {% endfor %}
            </select>
          </label>
          <label class="field fiel-medium bottom-padding-large">
            <span class="field-label">{{ entry_sort_order }}</span>
            <input class="field-entry mask-number" type="text" name="itaushopline_sort_order" value="{{ itaushopline_sort_order }}" size="1" />
          </label>
          <label class="field fiel-medium">
            <span class="field-label">{{ entry_geo_zone }}</span>
            <select class="field-entry" name="itaushopline_geo_zone_id">
            <option value="0">{{ text_zones }}</option>
              {% for geo_zone in geo_zones %}
                <option value="{{ geo_zone.geo_zone_id }}" {{ (geo_zone.geo_zone_id == itaushopline_geo_zone_id) ? 'selected="selected"' : '' }}>{{ geo_zone.name }}</option>
              {% endfor %}
            </select>
          </label>
        </div>
      </div>
    </div>
  </form>
</div>
{{ footer }}
