{% extends 'admin-v2/layout.html.twig' %}

{% set menu = 'admin_v2_setting_refund' %}
{% set script_controller = 'system/refund' %}

{% block main %}

{{ web_macro.flash_messages() }}

<form class="form-horizontal" id="refund-form" method="post" novalidate>
  <div class="form-group">
    <div class="col-md-3 control-label">
      <label for="max-refund-days-field" >{{'admin.finance_refund.max_refund_days'|trans}}</label>
    </div>
    <div class="controls col-md-8">
      <input id="max-refund-days-field" class="form-control" name="maxRefundDays" type="text"   value="{{refundSetting.maxRefundDays}}">
      <div class="help-block">{{ 'admin.finance_refund.max_refund_days_hint'|trans|raw }}</div>
    </div>
  </div>

  <div class="form-group">
    <div class="col-md-3 control-label">
      <label for="apply-notification-field" >{{'admin.finance_refund.apply_notification'|trans}}</label>
    </div>
    <div class="controls col-md-8">
      <textarea id="apply-notification-field" class="form-control" name="applyNotification">{{ refundSetting.applyNotification|trans }}</textarea>
      <div class="help-block">{{'admin.finance_refund.apply_notification_hint'|trans}}</div>
    </div>
  </div>

  <div class="form-group">
    <div class="col-md-3 control-label">
      <label for="success-notification-field" >{{'admin.finance_refund.success_notification'|trans}}</label>
    </div>
    <div class="controls col-md-8">
      <textarea id="success-notification-field" class="form-control" name="successNotification">{{ refundSetting.successNotification|trans }}</textarea>
      <div class="help-block">{{'admin.finance_refund.success_notification_hint'|trans}}</div>
    </div>
  </div>

  <div class="form-group">
    <div class="col-md-3 control-label">
      <label for="failed-notification-field">{{'admin.finance_refund.failed_notification'|trans}}</label>
    </div>
    <div class="controls col-md-8">
      <textarea id="failed-notification-field" class="form-control" name="failedNotification">{{ refundSetting.failedNotification|trans }}</textarea>
      <div class="help-block">{{'admin.finance_refund.failed_notification_hint'|trans}}</div>
    </div>
  </div>

  <div class="form-group">
    <div class="col-md-3 control-label"></div>
    <div class="controls col-md-8">
      <button type="submit" class="btn btn-primary">{{'form.btn.submit'|trans}}</button>
    </div>
  </div>
  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
</form>

<div class="alert alert-info">
  <p><strong>{{'admin.finance_refund.notification_variable_description'|trans}}：</strong></p>
  <ul>
    <li>{% verbatim %}{{item}}{% endverbatim %}: {{'admin.finance_refund.refund_course_or_classroom'|trans}}</li>
    <li>{% verbatim %}{{amount}}{% endverbatim %}: {{'admin.finance_refund.refund_amount'|trans}}</li>
  </ul>
</div>

{% endblock %}