samjeston / openhub Public
Sam Jeston Working vertical 9aa3c45 · History
38 lines· 1.9 KB ·HTML
Raw
1{% extends "base.html" %}
2{% block title %}Sign up · Openhub{% endblock %}
3{% block page_class %}auth-page{% endblock %}
4{% block content %}
5<div class="auth-card">
6 <h1>Create your account</h1>
7 {% if !allowed %}
8 <div class="box box-body">
9 <p>Registration is disabled on this server. Ask an administrator to create an account for you.</p>
10 <a class="btn btn-block" href="/login">Sign in instead</a>
11 </div>
12 {% else %}
13 {% if first_user %}
14 <div class="flash flash-info">{{ crate::web::fmt::icon("circle-alert")|safe }}<span>This is the first account on this server, so it will be the administrator.</span></div>
15 {% endif %}
16 {% if let Some(e) = error %}<div class="flash flash-error">{{ crate::web::fmt::icon("circle-alert")|safe }}<span>{{ e }}</span></div>{% endif %}
17 <form method="post" action="/register" class="box box-body form">
18 <label class="field">
19 <span class="field-label">Username</span>
20 <input class="input" type="text" name="username" value="{{ username }}" autocomplete="username" autocapitalize="off" maxlength="39" pattern="[A-Za-z0-9\-]+" autofocus required>
21 <span class="field-hint">Letters, numbers and single hyphens.</span>
22 </label>
23 <label class="field">
24 <span class="field-label">Email</span>
25 <input class="input" type="email" name="email" value="{{ email }}" autocomplete="email" required>
26 <span class="field-hint">Used for merge commits you create on the web.</span>
27 </label>
28 <label class="field">
29 <span class="field-label">Password</span>
30 <input class="input" type="password" name="password" autocomplete="new-password" minlength="8" required>
31 <span class="field-hint">At least 8 characters.</span>
32 </label>
33 <button class="btn btn-primary btn-block" type="submit">Create account</button>
34 </form>
35 {% endif %}
36 <div class="auth-alt">Already have an account? <a href="/login">Sign in</a>.</div>
37</div>
38{% endblock %}