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

{% set menu = 'admin_coin_settings' %}

{% set script_controller = "coin/save" %}
{% block main %}
  {{ web_macro.flash_messages() }}
  <form class="form-horizontal" method="post" id="coin-model-form" action="{{path('admin_coin_model_save')}}">
  
    <ul class="breadcrumb">
      <li><a href="{{path('admin_coin_model')}}">{{'使用方式设置'|trans}}</a></li>
      <li class="active">{{'课程价格设置'|trans}}</li>
    </ul>

    <p>
      <span>{{'使用方式：'|trans}}</span>
      <strong class="text-info">
        {% if set.cash_model =="deduction" %}
          {{'用于抵扣'|trans}}
        {% else %}
          {{'用于标价'|trans}}
        {% endif %}
      </strong>
      <span class="mll" data-val="{{ set.cash_rate}}" id="cash-rate">{{'汇率：'|trans}}</span>
      {{'1元人民币兑换'|trans}} 
      <strong class="text-info">{{ set.cash_rate}}</strong> 
      {{ setting('coin.coin_name') }}
    </p>
    <div id="typelist">
      {% include 'admin/coin/coin-table-setting.html.twig' %}
    </div>
    <input type="hidden" name="cash_model" value="{{ set.cash_model }}">
    <input type="hidden" name="cash_rate" value="{{ set.cash_rate }}">
    <input type="hidden" name="type" value="{{type|default('course')}}">
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    <p>
      <button type="submit" class="btn btn-primary pull-right" id="finish" >{{'完成'|trans}}</button>
      <a type="button" href="{{ url('admin_coin_model',{set:set}) }}" class="btn btn-link pull-right">{{'上一步'|trans}}</a>
    </p>
  </form>
{% endblock %}