This repository has been archived on 2025-08-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
web-app-template/template/auth/change_password.templ
Tim Wundenberg b3308d6a90
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 40s
feat(security): #328 delete old sessions for change and forgot password
2024-12-18 22:53:28 +01:00

47 lines
1.0 KiB
Plaintext

package auth
templ ChangePasswordComp(isPasswordReset bool) {
<form
class="max-w-xl px-2 mx-auto flex flex-col gap-4 h-full justify-center"
if isPasswordReset {
hx-post="/api/auth/forgot-password-actual"
} else {
hx-post="/api/auth/change-password"
}
hx-swap="none"
>
<h2 class="text-6xl mb-10">
Change Password
</h2>
if !isPasswordReset {
<label class="input input-bordered flex items-center gap-2">
<input
type="password"
class="grow"
placeholder="Current Password"
name="current-password"
spellcheck="false"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
/>
</label>
}
<label class="input input-bordered flex items-center gap-2">
<input
type="password"
class="grow"
placeholder="New Password"
name="new-password"
spellcheck="false"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
/>
</label>
<button class="btn btn-primary self-end">
Change Password
</button>
</form>
}