mirror of
https://github.com/markbeep/AudioBookRequest.git
synced 2026-02-12 16:58:55 -06:00
70 lines
2.0 KiB
HTML
70 lines
2.0 KiB
HTML
<!-- Admin initialization page -->
|
|
{% extends "base.html" %} {% block head %}
|
|
<title>Initialize admin user</title>
|
|
{% endblock %} {% block body %}
|
|
<div class="h-screen w-full flex items-center justify-center">
|
|
<form
|
|
class="flex flex-col gap-2 max-w-[30rem]"
|
|
hx-post="/init"
|
|
id="form"
|
|
hx-target="#message"
|
|
>
|
|
<p>
|
|
No user was found in the database. Please create an admin user to get set
|
|
up.
|
|
</p>
|
|
|
|
<label for="login-type">Login Type</label>
|
|
<select id="login-type" name="login_type" class="select w-full">
|
|
<option value="basic">Basic Auth (Dialog)</option>
|
|
<option value="forms" selected>Forms Login</option>
|
|
<option value="none">None (Insecure)</option>
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<label for="username">Username</label>
|
|
<input
|
|
id="username"
|
|
name="username"
|
|
type="text"
|
|
class="input w-full"
|
|
minlength="1"
|
|
required
|
|
/>
|
|
|
|
<label for="password">Password</label>
|
|
<input
|
|
id="password"
|
|
name="password"
|
|
type="password"
|
|
class="input w-full"
|
|
pattern="(?=[^A-Z]*[A-Z])(?=[^a-z]*[a-z])(?=\D*\d).{8,}"
|
|
oninvalid="this.setCustomValidity('Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, and one number')"
|
|
oninput="this.setCustomValidity('')"
|
|
required
|
|
/>
|
|
|
|
<label for="confirm_password">Confirm password</label>
|
|
<input
|
|
id="confirm_password"
|
|
name="confirm_password"
|
|
type="password"
|
|
class="input w-full"
|
|
pattern="(?=[^A-Z]*[A-Z])(?=[^a-z]*[a-z])(?=\D*\d).{8,}"
|
|
oninvalid="this.setCustomValidity('Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, and one number')"
|
|
oninput="this.setCustomValidity('')"
|
|
required
|
|
/>
|
|
|
|
{% block init_messages %}
|
|
<span id="message" class="text-red-400">{{error}}</span>
|
|
{% endblock %}
|
|
|
|
<button id="submit" class="btn btn-primary" type="submit">
|
|
Create account
|
|
</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|