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

{% block title %}{{ 'admin.open_manage.delete.check_password'|trans }}{% endblock %}

{% block body %}
  <form id="delete-form" action="{{path('admin_v2_check_password')}}">
    <div class="row form-group">
      <div class="col-md-2 control-label">
        <label for="title">{{ 'admin.open_manage.delete.user_password'|trans }}</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="{{ 'form.btn.submit.submiting'|trans }}" type="submit" class="btn btn-primary pull-right" data-toggle="form-submit" data-target="#delete-form"
  data-lesson-delete-url="{{ path('admin_v2_open_course_delete',{courseId:course.id,type:'lessons'}) }}"
  data-member-delete-url="{{ path('admin_v2_open_course_delete',{courseId:course.id,type:'members'}) }}"
  data-recommend-delete-url="{{ path('admin_v2_open_course_delete',{courseId:course.id,type:'recommend'}) }}"
  data-course-delete-url="{{ path('admin_v2_open_course_delete',{courseId:course.id,type:'course'}) }}"
  data-material-delete-url="{{ path('admin_v2_open_course_delete',{courseId:course.id,type:'materials'}) }}"
  >{{ 'form.btn.submit'|trans }}</button>
  <button type="button" class="btn btn-link pull-right btn-closed" data-dismiss="modal">{{ 'form.btn.cancel'|trans }}</button>

   <strong class="text text-danger" id="delete-hint" style="display:none;">{{ 'admin.open_manage.delete.delete.tips'|trans }}</strong>

  <button id="finish-delete-btn" data-loading-text="{{ 'admin.open_manage.delete.delete_finish_weating.tips'|trans }}" class="btn btn-primary" style="display:none;"data-dismiss="modal">{{ 'admin.open_manage.delete.delete_finished_btn'|trans }}</button>

  <script>app.load('open-course/delete-modal');</script>
{% endblock %}
