{% extends 'bootstrap-modal-layout.html.twig' %}
{% block title %}{{'设置支付密码'|trans}}{% endblock %}
{% set modalSize = 'large' %}
{% do script(['libs/jquery-validation.js', 'app/js/settings/pay-password-modal/index.js']) %}

{% block body %}
  <form id="settings-pay-password-form" class="form-horizontal" method="post" action="{{path('settings_set_pay_password')}}">
    <div class="form-group">
      <div class="col-md-3 col-md-offset-1 control-label">{{ form_label(form.currentUserLoginPassword, '用户登录密码'|trans) }}</div>
      <div class="controls col-md-6 controls">
        {{ form_widget( form.currentUserLoginPassword,{attr:{ class:'form-control', 'data-url':path('settings_check_login_password')}}) }}
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-3 col-md-offset-1 control-label">{{ form_label(form.newPayPassword, '新支付密码'|trans) }}</div>
      <div class="controls col-md-6 controls">
        {{ form_widget(form.newPayPassword, {attr:{class:'form-control'}}) }}
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-3 col-md-offset-1 control-label">{{ form_label(form.confirmPayPassword, '确认支付密码'|trans) }}</div>
      <div class="controls col-md-6 controls">
        {{ form_widget(form.confirmPayPassword, {attr:{class:'form-control'}}) }}
      </div>
    </div>

    <div style="display: none;">
      {{ form_rest(form) }}
    </div>

    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>
{% endblock %}

{% block footer %}
  <span class="btn btn-primary pull-right js-submit-form" data-loading-text="{{ '正在提交...'|trans }}">{{'提交'|trans}}</span>
  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">{{'取消'|trans}}</button>
{% endblock %}