{{ 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-paypal-express-checkout/"
              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.error_warning is defined %}
          <div class="warning full-width">{{ error.error_warning }}</div>
        {% endif %}
      </div>
      <div class="col-xs-12">
        <div class="flex js-tabs" id="tab-info"></div>
      </div>
    </div>
  </div>
  <div class="adm-wait-urgent flex middle-xs vertical-padding-small horizontal-padding-medium">
    <i class="fas fa-exclamation-triangle text-light padding-small bottom-margin-x-small"></i>
    <span class="text-small text-light padding-small col-sm"><b class="visible-block">{{ text_module_info }}</b>{{ text_module_sub_info }}</span>
  </div>
</header>
<form action="{{ action }}" method="post" class="js-main-form">
  <div class="container-fluid" data-tabs-id="tab-info">

    <div id="tab-api-details" class="row hidden" data-tab="{{ tab_general }}">
      <div class="col-xs-12">
        <div class="content-box">
          <span class="text-x-large text-dark">{{ tab_general }}</span>
        </div>
      </div>
      <div class="col-xs-12 col-md-8">
        <div class="content-box background-white shadow-small padding-large">
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_title }}</span>
            <input class="field-entry" type="text" name="pp_express_title" value="{{ pp_express_title }}"/>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_username }}</span>
            <input class="field-entry" type="text" name="pp_express_username" value="{{ pp_express_username }}"/>
            {% if error.username is defined %}
                <span class="text-error text-x-small">{{ error.username }}</span>
            {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_password }}</span>
            <input class="field-entry" type="text" name="pp_express_password" value="{{ pp_express_password }}"/>
            {% if error.password is defined %}
              <span class="text-error text-x-small">{{ error.password }}</span>
            {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label required">{{ entry_signature }}</span>
            <input class="field-entry" type="text" name="pp_express_signature" value="{{ pp_express_signature }}"/>
            {% if error.signature is defined %}
              <span class="text-error text-x-small">{{ error.signature }}</span>
            {% endif %}
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_total }}</span>
            <span class="text-x-small text-gray">{{ entry_total_obs }}</span>
            <input class="field-entry mask-money" type="text" name="pp_express_total" value="{{ pp_express_total }}"/>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label"></span>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label"></span>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label"></span>
          </label>

          <div>
            <span class="text-small text-dark text-bold visible-block"> {{ text_ipn }}</span>
            <span class="text-x-small text-gray visible-block"> {{ text_ipn_obs }}</span>
            <span class="text-small text-gray js-copy-content">{{ text_ipn_url }}</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="content-box background-white shadow-small padding-large">
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_status }}</span>
            <select class="field-entry" name="pp_express_status">
              <option value="1" {{ pp_express_status ? 'selected' : '' }}>{{ text_enabled }}</option>
              <option value="0" {{ pp_express_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="pp_express_display" >
              {% for key, display in Type_DisplayModuleOption.getEnumList() %}
                <option value="{{ key }}" {{ ftr_geral.isSelected(key, pp_express_display, Type_DisplayModuleOption.Tp_Todos) }}>{{ display }}</option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_method }}</span>
            <select class="field-entry" name="pp_express_method">
              <option value="Sale" {{ ((pp_express_method == '' or pp_express_method == 'Sale') ? 'selected="selected"' : '') }}>{{ text_sale }}</option>
              <option value="Authorization" {{ (pp_express_method == 'Authorization' ? 'selected="selected"' : '') }}>{{ text_authorization }}</option>
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_test }}</span>
            <select class="field-entry" name="pp_express_test">
              <option value="1" {{ pp_express_test ? 'selected' : '' }}/>
                {{ text_yes }}
              </option>
              <option value="0" {{ pp_express_test ? '' : 'selected' }}/>
                {{ text_no }}
              </option>
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_debug }}</span>
            <select class="field-entry" name="pp_express_debug">
              <option value="1" {{ pp_express_debug ? 'selected' : '' }}/>
                {{ text_yes }}
              </option>
              <option value="0" {{ pp_express_debug ? '' : 'selected' }}/>
                {{ text_no }}
              </option>
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label"> {{ entry_sort_order }}</span>
            <input class="field-entry js-number" type="text" name="pp_express_sort_order" value="{{ pp_express_sort_order }}" size="1"/>
          </label>
          <label class="field field-medium">
            <span class="field-label">{{ entry_geo_zone }}</span>
            <select class="field-entry" name="pp_express_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 == pp_express_geo_zone_id ? 'selected' : '' }}>
                  {{ geo_zone.name }}
                </option>
              {% endfor %}
            </select>
          </label>
        </div>
      </div>
    </div>

    <div id="tab-status" class="row hidden" data-tab="{{ tab_order_status }}">
      <div class="col-xs-12 col-md-8">
        <div class="content-box bottom-padding-large">
          <div class="flex between-xs middle-xs">
            <span class="text-x-large text-dark">{{ tab_order_status }}</span>
          </div>
        </div>
        <div class="content-box background-white shadow-small padding-large">
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_canceled_reversal_status }}</span>
            <select class="field-entry" name="pp_express_canceled_reversal_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_canceled_reversal_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_completed_status }}</span>
            <select class="field-entry" name="pp_express_completed_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_completed_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label"> {{ entry_denied_status }}</span>
            <select class="field-entry" name="pp_express_denied_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_denied_status_id ? 'selected' : '' }}>
                {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_expired_status }}</span>
            <select class="field-entry" name="pp_express_expired_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_expired_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_failed_status }}</span>
            <select class="field-entry" name="pp_express_failed_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_failed_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_pending_status }}</span>
            <select class="field-entry" name="pp_express_pending_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_pending_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_processed_status }}</span>
            <select class="field-entry" name="pp_express_processed_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_processed_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_refunded_status }}</span>
            <select class="field-entry" name="pp_express_refunded_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_refunded_status_id ? 'selected' : '' }}>
                {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_refunded_partially_status }}</span>
            <select class="field-entry" name="pp_express_refunded_partially_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_refunded_partially_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium bottom-margin-large">
            <span class="field-label">{{ entry_reversed_status }}</span>
            <select class="field-entry" name="pp_express_reversed_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_reversed_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
          <label class="field field-medium">
            <span class="field-label">{{ entry_voided_status }}</span>
            <select class="field-entry" name="pp_express_voided_status_id">
              {% for order_status in order_statuses %}
                <option value="{{ order_status.order_status_id }}" {{ order_status.order_status_id == pp_express_voided_status_id ? 'selected' : '' }}>
                  {{ order_status.name }}
                </option>
              {% endfor %}
            </select>
          </label>
        </div>
      </div>
    </div>

    <div id="tab-customise" class="row hidden" data-tab="{{ tab_customise }}">
      <div class="col-xs-12 col-md-8">
        <div class="content-box bottom-padding-large">
          <div class="flex between-xs middle-xs">
            <span class="text-x-large text-dark">{{ tab_customise }}</span>
          </div>
        </div>
        <div class="content-box background-white shadow-small padding-large">
          <label class="field field-medium">
            <span class="field-label">{{ entry_logo }}</span>
            <span class="text-x-small text-gray">{{ entry_logo_obs }}</span>
            <div class="vertical-padding-small">
              <img src="{{ thumb }}" alt="" id="thumb" title="Selecionar imagem" class="js-filemanager cursor-pointer" />
              <input class="" type="hidden" name="pp_express_logo" value="{{ pp_express_logo }}" id="image" />
              <a class="js-remove-img"><span class="text-x-small visible-block">{{ text_clear }}</span></a>
            </div>
          </label>
        </div>
      </div>
    </div>

  </div>
</form>
<script>
  var noImg = '{{ no_image }}';
</script>
{{ footer }}
