| 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 |
<form class="card" method="post" action="/register"> |
| 13 |
<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}"> |
| 14 |
<label for="email">Email</label><input type="email" id="email" name="email" autocomplete="email"> |
| 15 |
<label for="password">Password (at least 10 characters)</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10"> |
| 16 |
{% if !first && mode == "invite" %}<label for="invite">Invitation code</label><input type="text" id="invite" name="invite" value="{{ invite }}" required>{% endif %} |
| 17 |
<button type="submit">CREATE ACCOUNT</button> |
| 18 |
</form> |
| 19 |
{% endif %} |
| 20 |
{% endblock %} |