user.removeusers.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 "listuserurl" as thelistuserurl %}
  22. <a class="btn btn-default {%if request.path = thelistuserurl%} active {%endif%}" href={{ thelistuserurl }}><span class="glyphicon glyphicon-list"></span>用户列表</a>
  23. {% url "removesusersurl" as theremovesusersurl %}
  24. <a class="btn btn-default {%if request.path = theremovesusersurl%} active {%endif%}" href={{ theremovesusersurl }}><span class="glyphicon glyphicon-list"></span>批量删除</a>
  25. </div>
  26. </div>
  27. <hr/>
  28. <form class="form-horizontal" role="form" action={% url "removesusersurl" %} method="POST" enctype="multipart/form-data">
  29. {% csrf_token %}
  30. {% for item in form %}
  31. <div class="form-group">
  32. <label class="control-label col-md-1">{{item.label}}</label>
  33. <div class="col-md-11">
  34. {{item}}
  35. </div>
  36. <div class="col-md-offset-1 col-md-10">
  37. {{item.errors}}
  38. </div>
  39. </div>
  40. {% endfor %}
  41. <div class="form-group">
  42. <div class="col-md-offset-1 col-md-10">
  43. <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('确认批量删除吗?')">批量删除</button>
  44. </div>
  45. </div>
  46. </form>
  47. <script>
  48. var demo1 = $('select[name="classid"]').bootstrapDualListbox({
  49. nonSelectedListLabel: '可选择分组',
  50. selectedListLabel: '已选择分组',
  51. preserveSelectionOnMove: 'moved',
  52. moveOnSelect: false,
  53. });
  54. </script>
  55. {% endblock %}