File size: 2,438 Bytes
aec61e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{% extends "base.html" %}
{% block content %}
<section class="login-boundary">
  <h1>Create your account</h1>
  {% if auth_status %}
    <p role="status" data-auth-state="{{ auth_status.state }}">
      <strong>{{ auth_status.label }}:</strong> {{ auth_status.detail }}
    </p>
  {% endif %}
  {% if errors %}
    <div class="form-errors" role="alert">{% for error in errors %}<p>{{ error }}</p>{% endfor %}</div>
  {% endif %}
  <form class="login-form" action="/register" method="post"{% if public_registration_enabled %} data-external-registration="true"{% endif %}>
    <input type="hidden" name="csrf" value="{{ csrf }}">
    <input type="hidden" name="next" value="{{ next_path }}">
    <label for="register-name">Name</label>
    <input id="register-name" name="display_name" autocomplete="name" required>
    <label for="register-email">Email address</label>
    <input id="register-email" name="email" type="email" autocomplete="email" required{% if public_registration_enabled %} data-auth-email{% endif %}>
    {% if public_registration_enabled %}
    <button type="button" data-auth-send-code>Send verification code</button>
    <section data-auth-code-panel hidden aria-label="Verify email address">
      <label for="public-registration-code">Verification code</label>
      <input id="public-registration-code" data-auth-code inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]{6}" maxlength="6">
      <button type="button" data-auth-verify-code>Verify code</button>
    </section>
    <p data-auth-verification-status role="status" aria-live="polite"></p>
    {% endif %}
    <label for="register-password">Password</label>
    <input id="register-password" name="password" type="password" autocomplete="new-password" minlength="10" required>
    <button class="primary" type="submit"{% if public_registration_enabled %} disabled data-auth-create-account{% endif %}>Create account</button>
  </form>
  {% if public_registration_enabled %}<script src="/static/auth-verification.js"></script>{% endif %}
  <p><a href="/auth/inbox?purpose=registration&amp;next={{ next_path | urlencode }}">Open verification messages</a></p>
  {% if auth_status and auth_status.can_retry %}
    <p><a href="/register?next={{ next_path | urlencode }}&amp;retry=true">Try again</a></p>
  {% endif %}
  <p>Already have an account? <a href="/login_or_join?next={{ next_path | urlencode }}">Log in</a>.</p>
</section>
{% endblock %}