checkIn.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {% extends 'checkIn/layout.html' %}
  2. {% load staticfiles %}
  3. {% block script %}
  4. <script src="{% static '/JS/userCheckIn.js' %}"></script>
  5. <link href="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.css" rel="stylesheet">
  6. <script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js"></script>
  7. <script src="{% static '/JS/datepickerCN.js' %}"></script>
  8. {% endblock %}
  9. {% block body %}
  10. <div class="container" style="background-color:lightgoldenrodyellow">
  11. <h3>{{checkIn.description}}:</h3>
  12. <form id="checkIn" method="post">
  13. {% csrf_token %}
  14. <table class="table">
  15. {% for item in items %}
  16. <tr>
  17. <th>{{item.description}}{% if item.unique %}(这个内容不能和别的签到者重复){% endif %}:</th>
  18. <td>
  19. {% if item.type == 0 %}<input type="text" required="required" name="{{item.description}}" style="width:100%"/>{% endif %}
  20. {% if item.type == 1 %}<input type="number" required="required" name="{{item.description}}" style="width:100%" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" />{% endif %}
  21. {% if item.type == 2 %}<input type="email" required="required" name="{{item.description}}" style="width:100%"/>{% endif %}
  22. {% if item.type == 3 %}
  23. <input type="date" required="required" name="{{item.description}}" id="{{item.ID}}" style="width:100%"/>
  24. <script>
  25. var userAgent = navigator.userAgent;
  26. if (userAgent.indexOf("Trident") > -1 || userAgent.indexOf("MSIE") > -1) {
  27. $(function() {$("#{{item.ID}}").datepicker();});
  28. }
  29. </script>
  30. {% endif %}
  31. {% if item.type == 4 %}
  32. <select name="{{item.description}}">
  33. {% for option in item.option %}
  34. <option value="{{option}}">{{option}}</option>
  35. {% endfor %}
  36. </select>
  37. {% endif %}
  38. </td>
  39. </tr>
  40. {% endfor %}
  41. {% if captcha %}
  42. {{captcha}}
  43. {% endif %}
  44. </table>
  45. <div style="text-align:center">
  46. <input id="submit" type="submit" value="提交" class="btn btn-default" />
  47. </div>
  48. </form>
  49. <p><a href="/" target="_blank">如果你也想创建一个签到,报名活动的话,请访问我们的网站。</a></p>
  50. </div>
  51. {% endblock %}