{% extends 'old-bootstrap-modal-layout.html.twig' %}

{% block title %}核实用户密码{% endblock %}

{% block body %}
  <form id="delete-form" action="{{path('admin_check_password')}}">
    <div class="row form-group">
      <div class="col-md-2 control-label">
        <label for="title">用户密码</label>
      </div>
      <div class="col-md-8 controls">
        <input type="password" name="password" class="form-control">
      </div>
    </div>
    <input type="hidden" name="courseId" value="{{course.id}}"/>
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>
  <div id="delete-course-progress" class="delete-course-progress" style="display:none;">
    <div class="progress progress-striped active">
      <div class="progress-bar progress-bar-success" style="width: 0%"></div>
    </div>
    <div class="text-success progress-text"></div>
  </div>
{% endblock %}

{% block footer %}
  <button id="delete-btn" data-submiting-text="正在提交" type="submit" class="btn btn-primary pull-right" data-toggle="form-submit" data-target="#delete-form"
  data-lesson-delete-url="{{ path('admin_open_course_delete',{courseId:course.id,type:'lessons'}) }}"
  data-member-delete-url="{{ path('admin_open_course_delete',{courseId:course.id,type:'members'}) }}"
  data-recommend-delete-url="{{ path('admin_open_course_delete',{courseId:course.id,type:'recommend'}) }}"
  data-course-delete-url="{{ path('admin_open_course_delete',{courseId:course.id,type:'course'}) }}"
  data-material-delete-url="{{ path('admin_open_course_delete',{courseId:course.id,type:'materials'}) }}"
  >提交</button>
  <button type="button" class="btn btn-link pull-right btn-closed" data-dismiss="modal">取消</button>

   <strong class="text text-danger" id="delete-hint" style="display:none;">正在删除，请不要关闭当前窗口...</strong>

  <button id="finish-delete-btn" data-loading-text="正在完成删除, 请稍等..." class="btn btn-primary" style="display:none;"data-dismiss="modal">完成删除</button>
  
  <script>app.load('open-course/delete-modal');</script>
{% endblock %}