OXYGENHUB
# 617c2840446c oxygenhub / templates / register.html
1.2 KiB · HTML · last changed Milestone 0.2: accounts and access 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Register{% endblock %}
3
{% block content %}
4
<div class="head"><h1>Register <small>{% if first %}the first account becomes the administrator{% else %}registration is {{ mode }}{% endif %}</small></h1></div>
5
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
6
{% if !first && mode == "closed" %}
7
<p class="empty">Registration is closed. Ask an administrator for an account.</p>
8
{% else %}
9
<form class="card" method="post" action="/register">
10
  <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}">
11
  <label for="email">Email</label><input type="email" id="email" name="email" autocomplete="email">
12
  <label for="password">Password (at least 10 characters)</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10">
13
  {% if !first && mode == "invite" %}<label for="invite">Invitation code</label><input type="text" id="invite" name="invite" value="{{ invite }}" required>{% endif %}
14
  <button type="submit">CREATE ACCOUNT</button>
15
</form>
16
{% endif %}
17
{% endblock %}