chenzhaoyang
2025-12-17 94061671a5689bce6d8570ed168af2e79d391773
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% extends 'users/new-ui/user_base.html' %}
 
{% block content %}
  {{ block.super }}
  <script nonce="{{request.csp_nonce}}">
    gaClientIdTrackingIframe('users.login.view');
    // Give time for `ls_gaclient_id` to be set
    setTimeout(() => {
      const ls_gaclient_id = sessionStorage.getItem('ls_gaclient_id');
      __lsa('users.login.view', { ls_gaclient_id });
    }, 2000);
  </script>
{% endblock %}
 
{% block user_content %}
  <div class="form-wrapper">
    <h2>登录</h2>
    <form id="login-form" action="{% url 'user-login' %}?next={{ next }}" method="post">
      {% csrf_token %}
      <div class="input-wrapper">
        <label>邮箱地址</label>
        <input type="text" class="lsf-input-ls" name="email" id="email" value="{{ form.data.email }}">
      </div>
      <div class="input-wrapper">
        <label>密码</label>
        <input type="password" class="lsf-input-ls" name="password" id="password">
      </div>
      {% if form.non_field_errors %}
        {% for error in form.non_field_errors %}
          <p class="error">
            {{ error }}
          </p>
        {% endfor %}
      {% endif %}
      <div class="form-group">
        <input type="checkbox" id="persist_session" name="persist_session" class="lsf-checkbox-ls" checked="checked" style="width: auto;" />
        <label for="persist_session">保持登录状态</label>
      </div>
      <button type="submit" aria-label="Log In" class="login-button">登录</button>
    </form>
  </div>
  {% if not settings.DISABLE_SIGNUP_WITHOUT_LINK %}
  <div class="text-wrapper">
    <p class="">还没有账号?</p>
    <a href="{% url 'user-signup' %}{% querystring %}">注册</a>
  </div>
  {% endif %}
{% endblock %}