Files
AudioBookRequest/templates/init.html

64 lines
1.5 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"
required
/>
<label for="confirm_password">Confirm password</label>
<input
id="confirm_password"
name="confirm_password"
type="password"
class="input w-full"
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 %}