group.removegroups.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {% extends "base.html" %}
  2. {% block title %}
  3. 批量删除
  4. {% endblock %}
  5. {% block head %}
  6. <script src="/static/js/jquery.bootstrap-duallistbox.js"></script>
  7. <link rel="stylesheet" type="text/css" href="/static/css/bootstrap-duallistbox.css">
  8. {% endblock %}
  9. {% block content %}
  10. <div class="section section-breadcrumbs section-breadcrumbs-backend">
  11. <div class="container">
  12. <div class="row">
  13. <div class="col-md-12">
  14. <h1>批量删除</h1>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="btn-toolbar">
  20. <div class="btn-group">
  21. {% url "addgroupurl" as theaddgroupurl %}
  22. <a class="btn btn-default {%if request.path = theaddgroupurl%} active {%endif%}" href={{ theaddgroupurl }}><span class="glyphicon glyphicon-edit"></span>新建分组</a>
  23. {% url "listgroupurl" as thelistgroupurl %}
  24. <a class="btn btn-default {%if request.path = thelistgroupurl%} active {%endif%}" href={{ thelistgroupurl }}><span class="glyphicon glyphicon-list"></span>分组列表</a>
  25. {% url "addxlsgroupurl" as theaddxlsgroupurl %}
  26. <a class="btn btn-default {%if request.path = theaddxlsgroupurl%} active {%endif%}" href={{ theaddxlsgroupurl }}><span class="glyphicon glyphicon-list"></span>批量导入</a>
  27. {% url "removegroupsurl" as theremovegroupsurl %}
  28. <a class="btn btn-default {%if request.path = theremovegroupsurl%} active {%endif%}" href={{ theremovegroupsurl }}><span class="glyphicon glyphicon-list"></span>批量删除</a>
  29. </div>
  30. </div>
  31. <hr/>
  32. <form class="form-horizontal" role="form" action={% url "removegroupsurl" %} method="POST" enctype="multipart/form-data">
  33. {% csrf_token %}
  34. {% for item in form %}
  35. <div class="form-group">
  36. <label class="control-label col-md-1">{{item.label}}</label>
  37. <div class="col-md-11">
  38. {{item}}
  39. </div>
  40. <div class="col-md-offset-1 col-md-10">
  41. {{item.errors}}
  42. </div>
  43. </div>
  44. {% endfor %}
  45. <div class="form-group">
  46. <div class="col-md-offset-1 col-md-10">
  47. <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('确认批量删除吗?')">批量删除</button>
  48. </div>
  49. </div>
  50. </form>
  51. <script>
  52. var demo1 = $('select[name="classid"]').bootstrapDualListbox({
  53. nonSelectedListLabel: '可选择分组',
  54. selectedListLabel: '已选择分组',
  55. preserveSelectionOnMove: 'moved',
  56. moveOnSelect: false,
  57. });
  58. </script>
  59. {% endblock %}