feat: extract authentication to domain package
This commit was merged in pull request #393.
This commit is contained in:
46
internal/authentication/template/change_password.templ
Normal file
46
internal/authentication/template/change_password.templ
Normal file
@@ -0,0 +1,46 @@
|
||||
package template
|
||||
|
||||
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 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 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="button button-primary px-2 self-end">
|
||||
Change Password
|
||||
</button>
|
||||
</form>
|
||||
}
|
||||
Reference in New Issue
Block a user