29 lines
792 B
Plaintext
29 lines
792 B
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/reset-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"/>
|
|
</label>
|
|
}
|
|
<label class="input input-bordered flex items-center gap-2">
|
|
<input type="password" class="grow" placeholder="New Password" name="new-password"/>
|
|
</label>
|
|
<button class="btn btn-primary self-end">
|
|
Change Password
|
|
</button>
|
|
</form>
|
|
}
|