{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
        <a data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary" onclick="$('#form').submit();"><i class="fa fa-check-circle"></i></a>
        <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
      </div>
      <h1>{{ heading_title }}</h1>
      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
        <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    {% if error_warning %}
    <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
    {% endif %}
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-list"></i> {{ text_manage }}</h3>
      </div>
      <div class="panel-body">
        <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
          <input type="hidden" name="type" value="{{ type }}" />
          <input type="hidden" name="ebay_profile_id" value="{{ ebay_profile_id }}" />
          <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
            <li><a href="#tab-returns" data-toggle="tab">{{ tab_returns }}</a></li>
          </ul>
          <div class="tab-content">
            <div class="tab-pane active" id="tab-general">
              <div class="form-group">
                <label class="col-sm-2 control-label">{{ text_profile_default }}</label>
                <div class="col-sm-10">
                  <input type="hidden" name="default" value="0" />
                  <input type="checkbox" name="default" value="1"{% if default == 1 %} checked="checked"{% endif %} />
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label" for="name">{{ text_profile_name }}</label>
                <div class="col-sm-10">
                  <input type="text" name="name" value="{{ name }}" placeholder="{{ text_profile_name }}" id="name" class="form-control" />
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-2 control-label" for="description">{{ text_profile_desc }}</label>
                <div class="col-sm-10">
                  <textarea name="description" class="form-control" rows="3" id="description">{{ description }}</textarea>
                </div>
              </div>
            </div>
            <div class="tab-pane" id="tab-returns">
              {% if setting.returns.accepted is not empty %}
                <div class="form-group">
                  <label class="col-sm-2 control-label">{{ text_returns_accept }}</label>
                  <div class="col-sm-10">
                    <select name="data[returns_accepted]" class="form-control">
                      {% for return_accepted in setting.returns.accepted %}
                        <option value="{{ return_accepted.ReturnsAcceptedOption }}"{% if data.returns_accepted == return_accepted.ReturnsAcceptedOption %} selected{% endif %}>{{ return_accepted.Description }}</option>
                      {% endfor %}
                    </select>
                  </div>
                </div>
              {% else %}
                <input type="hidden" name="data[returns_accepted]" value="" />
              {% endif %}

              {% if setting.returns.within is not empty %}
                <div class="form-group">
                  <label class="col-sm-2 control-label">{{ text_returns_days }}</label>
                  <div class="col-sm-10">
                    <select name="data[returns_within]" class="form-control">
                      {% for return_within in setting.returns.within %}
                        <option value="{{ return_within.ReturnsWithinOption }}"{% if data.returns_within == return_within.ReturnsWithinOption %} selected{% endif %}>{{ return_within.Description }}</option>
                      {% endfor %}
                    </select>
                  </div>
                </div>
              {% else %}
                <input type="hidden" name="data[returns_within]" value="" />
              {% endif %}

              {% if setting.returns.paidby is not empty %}
              <div class="form-group">
                <label class="col-sm-2 control-label">{{ text_returns_costs }}</label>
                <div class="col-sm-10">
                  <select name="data[returns_shipping]" class="form-control">
                    {% for return_paidby in setting.returns.paidby %}
                      <option value="{{ return_paidby.ShippingCostPaidByOption }}"{% if data.returns_shipping == return_paidby.ShippingCostPaidByOption %} selected{% endif %}>{{ return_paidby.Description }}</option>
                    {% endfor %}
                  </select>
                </div>
              </div>
              {% else %}
                <input type="hidden" name="data[returns_shipping]" value="" />
              {% endif %}

              {% if setting.returns.refund is not empty %}
                <div class="form-group">
                  <label class="col-sm-2 control-label">{{ text_returns_type }}</label>
                  <div class="col-sm-10">
                    <select name="data[returns_option]" class="form-control">
                      {% for return_refund in setting.returns.refund %}
                        <option value="{{ return_refund.RefundOption }}"{% if data.returns_option == return_refund.RefundOption %} selected{% endif %}>{{ return_refund.Description }}</option>
                      {% endfor %}
                    </select>
                  </div>
                </div>
              {% else %}
                <input type="hidden" name="data[returns_option]" value="" />
              {% endif %}

              {% if setting.returns.description == true %}
                <div class="form-group">
                  <label class="col-sm-2 control-label">{{ text_returns_inst }}</label>
                  <div class="col-sm-10">
                    <textarea name="data[returns_policy]" class="form-control" rows="3" maxlength="5000">{{ data.returns_policy }}</textarea>
                  </div>
                </div>
              {% else %}
                <input type="hidden" name="data[returns_policy]" value="" />
              {% endif %}

              {% if setting.returns.restocking_fee is not empty %}
              <div class="form-group">
                <label class="col-sm-2 control-label">{{ text_returns_restock }}</label>
                <div class="col-sm-10">
                  <select name="data[returns_restocking_fee]" class="form-control">
                    {% for return_restocking_fee in setting.returns.restocking_fee %}
                      <option value="{{ return_restocking_fee.RestockingFeeValueOption }}"{% if data.returns_restocking_fee == return_restocking_fee.RestockingFeeValueOption %} selected{% endif %}>{{ return_restocking_fee.Description }}</option>
                    {% endfor %}
                  </select>
                </div>
              </div>
              {% else %}
                <input type="hidden" name="data[returns_restocking_fee]" value="" />
              {% endif %}
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
{{ footer }}
