internal/web/templates/register.html

v1.35.1
gitbay/internal/web/templates/register.html history · blame · raw

26 lines · 2023 bytes

 1{{define "title"}}register · {{.Site}}{{end}}
 2{{define "width"}}bounded{{end}}
 3{{define "content"}}
 4<h1>Create an account</h1>
 5{{if eq .Mode "invite"}}<p class="lede">This instance is invite-only. You need an invite code from an admin.</p>
 6{{else}}<p class="lede">Open registration. Your account activates once you verify your email.</p>{{end}}
 7{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
 8<form method="post" action="/register" class="signupform">
 9<div class="field"><label for="username">Username</label><input type="text" id="username" name="username" value="{{.Username}}" required autocomplete="username" autocapitalize="none" spellcheck="false"></div>
10{{if eq .Mode "invite"}}<div class="field"><label for="invite">Invite code</label><input type="text" id="invite" name="invite" required autocomplete="off" spellcheck="false"></div>
11{{else}}<div class="field"><label for="email">Email</label><input type="email" id="email" name="email" required autocomplete="email"></div>{{end}}
12<div class="field"><label for="key">SSH public key</label>
13<p class="hint">Paste the contents of your public key file, usually <code>~/.ssh/id_ed25519.pub</code>. It starts with <code>ssh-ed25519</code> or <code>ssh-rsa</code>.</p>
14{{/* The help is a disclosure rather than a link out: a wiki page is on
15     another origin, opens over the half-filled form, and has no way
16     back to it. */}}
17<details class="editbox"><summary>No key yet?</summary>
18<p class="meta">Run this, take the default path, and paste what the second line prints.</p>
19<pre class="code" tabindex="0">ssh-keygen -t ed25519
20cat ~/.ssh/id_ed25519.pub</pre>
21</details>
22<textarea id="key" name="key" rows="3" required spellcheck="false" placeholder="ssh-ed25519 AAAA… you@host"></textarea></div>
23<p><button type="submit">Create account</button></p>
24</form>
25<p class="meta">Prefer the terminal? <code>ssh git@{{.Host}} register --username you {{if eq .Mode "invite"}}--invite &lt;code&gt;{{else}}--email you@example.org{{end}}</code></p>
26{{end}}