icynet-auth-server/views/register.pug

49 lines
2.0 KiB
Plaintext

extends partials/layout.pug
block title
|Register | Icy Network
block body
include partials/logo.pug
div.container
div.center-box
h1 Register
if message.text
if message.error
.alert.alert-danger
span #{message.text}
else
.alert.alert-success
span #{message.text}
if registrationAuthorized
form(method="post")
div.form-container
input#csrf(type="hidden", name="_csrf", value=csrf)
label.form-label(for="username") Username
input.form-control#username(type="text", name="username", placeholder="Username", autofocus, value=form.username)
small.form-hint Between 3 and 26 English alphanumeric characters and .-_ only.
label.form-label(for="display_name") Display name
input.form-control#display_name(type="text", name="display_name", placeholder="Display name", value=form.display_name)
small.form-hint Maximum length is 32.
label.form-label(for="email") Email address
input.form-control#email(type="email", name="email", placeholder="Email address", value=form.email)
small.form-hint You will need to verify your email address before you can log in.
label.form-label(for="password") Password
input.form-control#password(type="password", name="password", placeholder="Password", value=form.password)
small.form-hint Must be at least 8 characters long, contain a capital and lowercase letter and a number.
label.form-label(for="password_repeat") Confirm password
input.form-control#password_repeat(type="password", name="password_repeat", placeholder="Confirm password")
button.btn.btn-primary(type="submit") Create a new account
a.btn.btn-link.align-self-end(type="button" href="/login") Log in instead
else
.alert.alert-danger
span Registrations are currently disabled. Sorry!
a.btn.btn-link.align-self-end(type="button" href="/login") Home