Files
AudioBookRequest/templates/init.html
2025-07-01 19:52:43 +02:00

51 lines
1.9 KiB
HTML

<!-- Admin initialization page -->
{% extends "base.html" %}
{% block head %}
<title>Initialize admin user</title>
{% endblock head %}
{% 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="{{ base_url }}/init"
id="form"
hx-target="#message">
<p class="opacity-60">
No user was found in the database. Please create a root admin user to get set
up. OpenID Connect can be configured later.
</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>
<label for="username">Username</label>
<input id="username"
name="username"
type="text"
class="input w-full"
placeholder="admin"
minlength="1"
required />
<label for="password">Password</label>
<input id="password"
name="password"
type="password"
placeholder="●●●●●●●●●●●●●●●●●"
class="input w-full"
required />
<label for="confirm_password">Confirm password</label>
<input id="confirm_password"
name="confirm_password"
type="password"
placeholder="●●●●●●●●●●●●●●●●●"
class="input w-full"
required />
{% block init_messages %}
<span id="message" class="text-red-400">{{ error }}</span>
{% endblock init_messages %}
<button id="submit" class="btn btn-primary" type="submit">Create account</button>
</form>
</div>
{% endblock body %}