OXYGENHUB
# 09ffa7b600a9 oxygenhub / templates / register.html
1.8 KiB · HTML · last changed A new hub gives administrator only to whoever brings its setup code 19 days ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Register{% endblock %}
3
{% block content %}
4
{# The mark (docs/backgrounds.md §2): brand only, no data. #}
5
<script type="application/json" id="backdrop-data">{"scene":"mark"}</script>
6
{% include "backdrop.html" %}
7
<div class="head"><h1>Register <small>{% if first %}the first account becomes the administrator{% else %}registration is {{ mode }}{% endif %}</small></h1></div>
8
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
9
{% if !first && mode == "closed" %}
10
<p class="empty">Registration is closed. Ask an administrator for an account.</p>
11
{% else %}
12
<div class="signin-layout">
13
<form class="card" method="post" action="/register">
14
  <label for="username">Username</label><input type="text" id="username" name="username" autocomplete="username" required pattern="[A-Za-z0-9][A-Za-z0-9._-]{0,63}">
15
  <label for="email">Email</label><input type="email" id="email" name="email" autocomplete="email">
16
  <label for="password">Password (at least 10 characters)</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10">
17
  {% if first %}<label for="setup">Setup code <small>logged by the server when it started, and in <code>setup-code</code> in its data directory</small></label><input type="text" id="setup" name="setup" autocomplete="off" required>{% endif %}
18
  {% if !first && mode == "invite" %}<label for="invite">Invitation code</label><input type="text" id="invite" name="invite" value="{{ invite }}" required>{% endif %}
19
  <button type="submit">CREATE ACCOUNT</button>
20
</form>
21
{% if !providers.is_empty() %}<div class="signin-or" aria-hidden="true"><span>or</span></div>
22
{% let verb = "Sign up" %}{% let suffix = provider_query.as_str() %}{% include "signin_buttons.html" %}{% endif %}
23
</div>
24
{% endif %}
25
{% endblock %}