group.edit.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {% extends "base.html" %}
  2. {% block title %}
  3. 编辑分组
  4. {% endblock %}
  5. {% block content %}
  6. <div class="section section-breadcrumbs section-breadcrumbs-backend">
  7. <div class="container">
  8. <div class="row">
  9. <div class="col-md-12">
  10. <h1>编辑分组</h1>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. <div class="btn-toolbar">
  16. <div class="btn-group">
  17. {% url "addgroupurl" as theaddgroupurl %}
  18. <a class="btn btn-default {%if request.path = theaddgroupurl%} active {%endif%}" href={{ theaddgroupurl }}><span class="glyphicon glyphicon-edit"></span>新建分组</a>
  19. {% url "listgroupurl" as thelistgroupurl %}
  20. <a class="btn btn-default {%if request.path = thelistgroupurl%} active {%endif%}" href={{ thelistgroupurl }}><span class="glyphicon glyphicon-list"></span>分组列表</a>
  21. {% url "addxlsgroupurl" as theaddxlsgroupurl %}
  22. <a class="btn btn-default {%if request.path = theaddxlsgroupurl%} active {%endif%}" href={{ theaddxlsgroupurl }}><span class="glyphicon glyphicon-list"></span>批量导入</a>
  23. {% url "removegroupsurl" as theremovegroupsurl %}
  24. <a class="btn btn-default {%if request.path = theremovegroupsurl%} active {%endif%}" href={{ theremovegroupsurl }}><span class="glyphicon glyphicon-list"></span>批量删除</a>
  25. </div>
  26. </div>
  27. <hr/>
  28. <form class="form-horizontal" role="form" action={% url "editgroupurl" ID %} method="POST" >
  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-2">
  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. {% endblock %}