{% if targetType == 'classroom'%}
  {% set maxRate = classroom.maxRate %}
{% elseif targetType == 'course' %}
  {% set maxRate = course.maxRate %}
{% elseif targetType == 'vip' %}
  {% set maxRate = level.maxRate %}
{% else %}
  {% set maxRate = 0 %}
{% endif %}

<div class="order-item clearfix">
  <div class="order-item-title" style="width:30%">
    <i class="es-icon es-icon-money"></i>
    <span class="title">{{ setting("coin.coin_name") }}</span>
    <span>{{'（1元 = %cashRate%%coin_name%）'|trans({'%cashRate%':cashRate,'%coin_name%':setting('coin.coin_name')})}}</span>
  </div>
  <div class="order-item-detail">
    {% if hasPayPassword %}
    {{'本次使用'|trans}}
    <input  {% if maxRate == 0 and priceType|default("RMB") == "RMB" %}readonly="true"{% endif %} id="coinPayAmount" class="form-control text-center inline-block width-input-small mhm" role="coinNum" type="text" name="coinPayAmount" value="">
    {{setting("coin.coin_name")}}
    {% endif %}
    <span class="coin-detail hidden-xs hidden-sm">
      （{{'账户余额：'|trans}}<span class="color-danger" role="accountCash">{{account.cash|default(0)}}</span> {{setting("coin.coin_name")}}）
    </span>
    <input style="display:none">{# Prevent autocompleting #}
    <input type="password" style="display:none">{# Prevent autocompleting #}
    {% if not hasPayPassword %}
    <div  class="alert alert-warning alert-xs mtm inline-block" style="line-height:20px">
        {{'为了保障账户资金安全，请先'|trans}}
        {% if hasPassword %}
        <a class="alert-link" href="javascript:;" data-toggle="modal" data-target="#modal" data-url="{{path('settings_set_pay_password')}}">{{'设置支付密码'|trans}}</a>
        {% else %}
        <a class="alert-link" href="javascript:;" data-toggle="modal" data-target="#modal" data-url="{{path('settings_set_password')}}">{{'设置登录密码'|trans}}</a>
        {% endif %}
    </div>
    {% else %}
    <div role="password-input" style="display:none">
      <div class="controls mtm">
        <input id="payPassword" class="form-control width-input-large inline-block" name="payPassword" type="password" placeholder="{{'请输入支付密码'|trans}}" data-url="{{path('pay_password_check')}}" autocomplete="off" data-type="get" data-display="{{'支付密码'|trans}}" />
        <a href="{{path('settings_find_pay_password')}}" target='_blank' class="btn-link">{{'忘记密码？'|trans}}</a>
        <br>
      </div>
    </div>
    {% endif %}
  </div>
  <div class="order-item-price" style="width:25%">
    <span class="mrs">{{'抵扣'|trans}}</span>
     {% if priceType|default("RMB") == "RMB" %}<span>￥</span>{% endif %}
    <span role="cash-discount" style="font-size: 24px" data-default-value="0.00"></span>
    <span>
      {% if priceType|default("RMB") == "RMB" %} {% else %} {{ setting("coin.coin_name") }} {% endif %}
    </span>
    {% if priceType|default("RMB") == "RMB" %}
      <p style="font-size:13px;" class="hidden-xs hidden-sm">({{'本订单最高可以使用'|trans}}<span id= "maxCoin" role="maxCoin">{{maxCoin|default(0)}}</span>{{setting("coin.coin_name")}})</p>
    {% endif %}
  </div>
</div>