1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{{define "content"}}
<div class="auth">
<h3 class="rule">Register for {{.Host}} <small>or <a href="/login">log in</a></small></h3>
{{if eq .Data.Mode "closed"}}<p class="info">Registration is closed on {{.Host}}. Ask an administrator for an account.</p>{{else}}<p>Registration gives you a page at <code>~username</code>, repositories under it, SSH and HTTPS push, and pull requests on anything public. An email address is optional and you are logged in straight away either way.</p>
<form method="post" action="/register" class="stack centred">
<label>Username <input name="name" required autofocus autocomplete="username" pattern="[a-z0-9][a-z0-9_.-]{0,38}" value="{{.Data.Name}}"><small>Lowercase letters, digits, dot, dash or underscore.</small></label>
<label>Password <input name="password" type="password" required minlength="8" autocomplete="new-password"></label>
{{if .Data.Mail}}<label>Email <span class="muted">(optional)</span> <input name="email" type="email" autocomplete="email" maxlength="200" value="{{.Data.Email}}"><small>We send one link to confirm it, after which it can reset your password. Never shown publicly.</small></label>{{end}}
{{if eq .Data.Mode "invite"}}<label>Invite code <input name="invite" required value="{{.Data.Invite}}"></label>{{end}}
<div class="actions"><button class="btn primary">Register ▸</button></div>
</form>{{end}}
<p class="privacy"><strong>Privacy notice</strong>: {{.Host}} stores your username, a hash of your password, the keys and profile details you choose to add, and the address of each failed login attempt for a few minutes. Nothing is collected for marketing or analytics and nothing is shared with third parties.</p>
</div>
{{end}}
|