group.addxls.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. <h2 class="col-md-offset-2">批量导入分组</h2>
  29. <br/>
  30. <h4 class="col-md-offset-1">请导入符合格式的XLS文件</h4>
  31. <h4 class="col-md-offset-1">XLS格式模板<a href='/static/class.xls'>下载</a></h4>
  32. <hr/>
  33. <form class="form-horizontal" role="form" action={% url "addxlsgroupurl" %} method="POST" enctype="multipart/form-data">
  34. {% csrf_token %}
  35. {% for item in form %}
  36. <div class="form-group">
  37. <label class="control-label col-md-2">{{item.label}}</label>
  38. <div class="col-md-2">
  39. {{item}}
  40. </div>
  41. <div class="col-md-offset-2 col-md-10">
  42. {{item.errors}}
  43. </div>
  44. </div>
  45. {% endfor %}
  46. <div class="col-md-offset-2">
  47. <button type="submit" class="btn btn-danger btn-sm">导 入</button>
  48. </div>
  49. </form>
  50. {% endblock %}