user_create.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {% extends "info/layout.html" %}
  2. {% load static %}
  3. {% block script %}{% endblock script %}
  4. {% block body %}
  5. <div id="main" class="container-fluid">
  6. <form method="post">
  7. {% csrf_token %}
  8. <div class="mb-3 mt-3">
  9. <label for="name" class="form-label">姓名:</label>
  10. <input type="text" class="form-control" id="name" placeholder="输入姓名" name="name" required maxlength="64" />
  11. </div>
  12. <div class="mb-3 mt-3">
  13. <label for="email" class="form-label">邮箱地址:</label>
  14. <input type="email" class="form-control" id="email" placeholder="输入邮箱地址" name="email" required
  15. maxlength="128" />
  16. </div>
  17. <div class="mb-3 mt-3">
  18. <label for="mobile" class="form-label">手机号码:</label>
  19. <input type="number" class="form-control" id="mobile" placeholder="输入手机号码" name="mobile" required
  20. min="13000000000" max="19999999999" />
  21. </div>
  22. <div class="mb-3 mt-3">
  23. <label for="position" class="form-label">职位:</label>
  24. <input type="text" class="form-control" id="position" placeholder="输入职位" name="position" maxlength="64" />
  25. </div>
  26. <div id="form-button-area">
  27. <button type="submit" class="btn btn-primary">添加</button>
  28. <a href="/home/">返回</a>
  29. </div>
  30. </form>
  31. </div>
  32. <style type="text/css">
  33. #main {
  34. display: inline-flex;
  35. justify-content: center;
  36. }
  37. form {
  38. justify-content: center;
  39. margin: 20px;
  40. width: 500px;
  41. }
  42. #form-button-area {
  43. display: flex;
  44. justify-content: space-around;
  45. margin-top: 10px;
  46. }
  47. </style>
  48. {% endblock body %}