fix(web): password requirement indicators on registration and admin create-user

The /register checklist was dead markup: initPasswordValidation() was
only ever called on the setup page, so the requirement rows never
updated and the Register button stayed disabled forever — web
self-registration was effectively broken. The register Alpine component
now initializes it.

The validator is parameterized (field/submit ids, confirm + username/
email checks optional) so the admin Create User form reuses it: confirm
field, live requirement rows, and the Create button gated on all checks
passing. Requirements mirror the server's passwordcomplex rules
(8+ chars, upper/lower/number/special — the hardcoded defaults; server-
tuned rule values are a future nicety, the server remains the enforcer
either way).
This commit is contained in:
John O'Keefe committed 2026-10-13 12:38:26 -04:00
1 parent f3c9d4b4e8
commit bc6ce41762
7 files changed
+153 -124

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ templ Register() {
<link href="/static/style.css" rel="stylesheet"/>
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg"/>
</head>
<body class="theme-tokyo-night min-h-screen" x-data="register" x-init="initRegisterTheme()">
<body class="theme-tokyo-night min-h-screen" x-data="register">
<div class="brand-gradient min-h-screen flex flex-col items-center justify-center p-4">
<div class="w-full max-w-sm">
<a href="/" class="flex items-center justify-center gap-2.5 mb-8">