{{ 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>
        </div>
        {% if error_warning %}
          <div class="warning full-width">{{ error_warning }}</div>
        {% endif %}
      </div>
    </div>
  </div>
</header>
<div class="container-fluid">
  <form action="{{ action }}" method="post" class="js-main-form">
    <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 field-medium bottom-margin-large">
            <span class="field-label">{{ entry_title }}</span>
	          <input class="field-entry" type="text" name="payu_title" value="{{ payu_title }}" />
	          {% if error_title %}
	            <span class="text-error text-x-small">{{ error_title }}</span>
	          {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_merchantId }}</span>
            <span class="text-x-small text-gray">{{ entry_merchantId_obs }}</span>
	          <input class="field-entry" type="text" name="payu_merchantId" value="{{ payu_merchantId }}" />
	          {% if error_merchantId %}
	            <span class="text-error text-x-small">{{ error_merchantId }}</span>
	          {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_accountId }}</span>
            <span class="text-x-small text-gray">{{ entry_accountId_obs }}</span>
						<input class="field-entry" type="text" name="payu_accountId" value="{{ payu_accountId }}" />
            {% if error_accountId %}
              <span class="text-error text-x-small">{{ error_accountId }}</span>
            {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_apilogin }}</span>
						<input class="field-entry" type="text" name="payu_apilogin" value="{{ payu_apilogin }}" />
            {% if error_apilogin %}
              <span class="text-error text-x-small">{{ error_apilogin }}</span>
            {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_apikey }}</span>
						<input class="field-entry" type="text" name="payu_apikey" value="{{ payu_apikey }}" />
            {% if error_apikey %}
              <span class="text-error text-x-small">{{ error_apikey }}</span>
            {% endif %}
          </label>
          <button type="button" class="btn-default btn-medium btn-primary bottom-margin-large js-validate-credentials" data-url="{{ url_validate_credentials }}">
            <span>{{ text_validate_credentials }}</span>
          </button>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_payu_order_aprovado }}</span>
            <span class="text-x-small text-gray">{{ entry_payu_order_aprovado_obs }}</span>
            <select class="field-entry" name="payu_order_aprovado" id="payu_order_aprovado">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == payu_order_aprovado ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_payu_order_pendente }}</span>
            <span class="text-x-small text-gray">{{ entry_payu_order_pendente_obs }}</span>
            <select class="field-entry" name="payu_order_pendente" id="payu_order_pendente">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == payu_order_pendente ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_payu_order_rejeitado }}</span>
            <span class="text-x-small text-gray">{{ entry_payu_order_rejeitado_obs }}</span>
            <select class="field-entry" name="payu_order_rejeitado" id="payu_order_rejeitado">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == payu_order_rejeitado ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_payu_order_erro }}</span>
            <span class="text-x-small text-gray">{{ entry_payu_order_erro_obs }}</span>
            <select class="field-entry" name="payu_order_erro" id="payu_order_erro">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == payu_order_erro ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_payu_order_expirado }}</span>
            <span class="text-x-small text-gray">{{ entry_payu_order_expirado_obs }}</span>
            <select class="field-entry" name="payu_order_expirado" id="payu_order_expirado">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == payu_order_expirado ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <div class="bottom-margin-large">
	          <span class="text-small text-dark text-bold visible-block">{{ entry_success }}</span>
            <span class="text-small text-gray js-copy-content">{{ link_successs }}</span>
            <span class="js-copy-action text-medium rel">
              <i class="far fa-clone" aria-hidden="true" title="Copiar"></i>
            </span>
          </div>
          <div>
	          <span class="text-small text-dark text-bold visible-block">{{ entry_callback }}</span>
            <span class="text-small text-gray js-copy-content">{{ link_callback }}</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 field-medium bottom-margin-large">
            <span class="field-label"> {{ entry_status }}</span>
					  <select class="field-entry" name="payu_status">
              <option value="1" {{ payu_status ? 'selected' : '' }}>{{ text_enabled }}</option>
              <option value="0" {{ payu_status ? '' : 'selected' }}>{{ text_disabled }}</option>
					  </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_display }}</span>
            <select class="field-entry" name="payu_display" >
              {% for key, display in Type_DisplayModuleOption.getEnumList() %}
                <option value="{{ key }}" {{ Ftr_Geral.isSelected(key, payu_display, Type_DisplayModuleOption.Tp_Todos) }}>{{ display }}</option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_update_status_alert }}</span>
            <span class="text-x-small text-gray">{{ entry_update_status_alert_obs }}</span>
			      <select class="field-entry" name="payu_update_status_alert">
	            <option value="1" {{ payu_update_status_alert ? 'selected' : '' }}>
                {{ text_yes }}
              </option>
	            <option value="0" {{ payu_update_status_alert ? 'selected' : '' }}>
                {{ text_no }}
              </option>
	          </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_modoteste }}</span>
            <select class="field-entry" name="payu_modoteste">
              <option value="1" {{ payu_modoteste ? 'selected' : '' }}>{{ text_enabled }}</option>
              <option value="0" {{ payu_modoteste ? '' : 'selected' }}>{{ text_disabled }}</option>
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ text_client }}</span>
            <span class="text-x-small text-gray">{{ text_client_obs }}</span>
            <input class="field-entry" type="text" name="payu_client_teste" value="{{ payu_client_teste }}" placeholder="ID do cliente de teste" id="input"  />
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label"> {{ entry_sort_order }}</span>
	          <input class="field-entry mask-number" type="text" name="payu_sort_order" value="{{ payu_sort_order }}" />
          </label>
          <label class="field field-medium">
            <span class="field-label">{{ entry_geo_zone }}</span>
			      <select class="field-entry" name="payu_geo_zone_id">
	            <option value="0">{{ text_all_zones }}</option>
	            {% for geo_zone in geo_zones %}
                <option value="{{ geo_zone.geo_zone_id }}" {{ geo_zone.geo_zone_id == payu_geo_zone_id ? 'selected' : '' }}>
                  {{ geo_zone.name }}
                </option>
	            {% endfor %}
	          </select>
          </label>
        </div>
      </div>

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