signup.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {% extends "base.html" %}
  2. {% load static %}
  3. {% load i18n %}
  4. {% load account socialaccount %}
  5. {% block title %}注册账号{% endblock %}
  6. {% block style %}
  7. <link rel="stylesheet" type="text/css" href="{% static 'L_header.css' %}">
  8. {% endblock style %}
  9. {% block content %}
  10. <div class="container mt-5">
  11. <div class="row">
  12. <div class="col-10" style=" float: none;
  13. display: block;
  14. margin-left: auto;
  15. margin-right: auto;
  16. margin-top: 50px;">
  17. <br>
  18. <p>
  19. {% blocktrans %}已经有账号了? 请 <a href="{{ login_url }}">登录</a>{% endblocktrans %}
  20. </p>
  21. <div class="col-8">
  22. <form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
  23. <div class="form-group">
  24. {% csrf_token %}
  25. <div class="form-group mb-1">
  26. <label for="id_username">
  27. 用户名
  28. </label>
  29. <input type="text" name="username" placeholder="请输入用户名"
  30. class="form-control" autocomplete="username" minlength="1" maxlength="150"
  31. required="" id="id_username"/>
  32. </div>
  33. {# <div class="form-group mb-1">#}
  34. {# <label for="id_email">#}
  35. {# 邮箱(选填)#}
  36. {# </label>#}
  37. {# <input type="email" name="email" placeholder="请输入邮箱" autocomplete="email" id="id_email"#}
  38. {# class="form-control"/>#}
  39. {# </div>#}
  40. <div class="form-group mb-1">
  41. <label for="id_password1">
  42. 输入密码:
  43. </label>
  44. <input type="password" name="password1" placeholder="请输入密码" autocomplete="new-password"
  45. required="" id="id_password1"
  46. class="form-control"/>
  47. </div>
  48. <div class="form-group mb-1">
  49. <label for="id_password2">
  50. 确认密码:
  51. </label>
  52. <input type="password" name="password2" placeholder="请再次输入密码"
  53. required="" id="id_password2"
  54. class="form-control"/>
  55. </div>
  56. {% if redirect_field_value %}
  57. <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"
  58. class="form-control"/>
  59. {% endif %}
  60. <button class="primaryAction btn btn-primary" type="submit"
  61. id="submit_sign_up">{% trans "注册" %} &raquo;
  62. </button>
  63. </div>
  64. </form>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. {% endblock %}