{% extends 'bootstrap-modal-layout.html.twig' %}
{% block title %}{{'user.settings.security.pay_password_set'|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_pay_password')}}">
    <div class="form-group">
      <div class="col-md-3 col-md-offset-1 control-label">{{ form_label(form.currentUserLoginPassword, 'user.settings.security.pay_password_set.user_login_password'|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, 'user.settings.security.pay_password_set.new_pay_password'|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, 'user.settings.security.pay_password_set.confirm_pay_password'|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="{{ 'form.btn.submit.submiting'|trans }}">{{'form.btn.submit'|trans}}</span>
  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">{{'form.btn.cancel'|trans}}</button>
{% endblock %}
