<fieldset>
  <legend>{{ 'admin.payment_setting.quickpay'|trans }}</legend>
  {% if setting('magic.quickpay', false) %}
    <div class="form-group">
      <div class="col-md-3 control-label">
        <label>{{ 'admin.payment_setting.api_status'|trans }}</label>
      </div>
      <div class="controls col-md-3 radios">
        {{ radios('quickpay_enabled', {1:'form.radio_btn.open'|trans, 0:'form.radio_btn.close'|trans}, payment.quickpay_enabled) }}
      </div>
      <div class="controls col-md-4 radios">
        <a href="http://www.edusoho.com/files/heepay.zip">{{ 'admin.payment_setting.quickpay_api_application_word'|trans }}</a>
      </div>
    </div>

    <div data-sub="quickpay" {% if not payment.quickpay_enabled %} class="hidden" {% endif %}>
      <div class="form-group">
        <div class="col-md-3 control-label">
          <label for="quickpay_key">PID</label>
        </div>
        <div class="controls col-md-8">
          <input type="text" id="quickpay_key" name="quickpay_key" class="form-control" value="{{payment.quickpay_key}}">
        </div>
      </div>

      <div class="form-group">
        <div class="col-md-3 control-label">
          <label for="quickpay_key">Key</label>
        </div>
        <div class="controls col-md-8">
          <input type="text" id="quickpay_secret" name="quickpay_secret" class="form-control" value="{{payment.quickpay_secret}}">
        </div>
      </div>

      <div class="form-group">
        <div class="col-md-3 control-label">
          <label for="quickpay_aes">Aes</label>
        </div>
        <div class="controls col-md-8">
          <input type="text" id="quickpay_aes" name="quickpay_aes" class="form-control" value="{{payment.quickpay_aes}}">
        </div>
      </div>
    </div>
  {% else %}
    <div class="alert alert-info text-center" role="alert">
      {{ 'admin.payment_setting.quickpay_tips'|trans }}
    </div>
  {% endif %}
</fieldset>