| 1 |
{% extends "base.html" %} |
| 2 |
|
| 3 |
{% block title %}Set New Password - Makenotwork{% endblock %} |
| 4 |
|
| 5 |
{% block body_attrs %} class="centered-page"{% endblock %} |
| 6 |
|
| 7 |
{% block content %} |
| 8 |
<h1 class="brand-h1">Makenot<span class="dot">.</span>work</h1> |
| 9 |
<div class="login-container"> |
| 10 |
<div id="form-feedback"> |
| 11 |
{% if let Some(msg) = error %}<div class="alert alert-error">{{ msg }}</div>{% endif %} |
| 12 |
</div> |
| 13 |
|
| 14 |
{% if valid %} |
| 15 |
<form class="login-form" |
| 16 |
hx-post="/reset-password" |
| 17 |
hx-target="#form-feedback" |
| 18 |
hx-swap="innerHTML" |
| 19 |
hx-indicator="#submit-spinner"> |
| 20 |
<h2 class="subtitle-h2">Set New Password</h2> |
| 21 |
<p class="form-description">Enter your new password below.</p> |
| 22 |
|
| 23 |
<input type="hidden" name="user" value="{{ user_id }}" /> |
| 24 |
<input type="hidden" name="expires" value="{{ expires }}" /> |
| 25 |
<input type="hidden" name="sig" value="{{ sig }}" /> |
| 26 |
|
| 27 |
<div class="form-group"> |
| 28 |
<label for="password">New Password</label> |
| 29 |
<input |
| 30 |
type="password" |
| 31 |
id="password" |
| 32 |
name="password" |
| 33 |
placeholder="--------" |
| 34 |
required |
| 35 |
minlength="8" |
| 36 |
autofocus |
| 37 |
/> |
| 38 |
</div> |
| 39 |
|
| 40 |
<div class="form-group"> |
| 41 |
<label for="password_confirm">Confirm Password</label> |
| 42 |
<input |
| 43 |
type="password" |
| 44 |
id="password_confirm" |
| 45 |
name="password_confirm" |
| 46 |
placeholder="--------" |
| 47 |
required |
| 48 |
minlength="8" |
| 49 |
/> |
| 50 |
</div> |
| 51 |
|
| 52 |
<button type="submit" class="btn-primary"> |
| 53 |
Set Password |
| 54 |
<span id="submit-spinner" class="htmx-indicator"> ...</span> |
| 55 |
</button> |
| 56 |
</form> |
| 57 |
{% else %} |
| 58 |
<div class="login-form"> |
| 59 |
<h2 class="subtitle-h2">Link Expired</h2> |
| 60 |
<p class="form-description">This password reset link has expired or is invalid. Please request a new one.</p> |
| 61 |
<a href="/forgot-password" class="btn btn-primary">Request New Link</a> |
| 62 |
</div> |
| 63 |
{% endif %} |
| 64 |
|
| 65 |
<div class="foot-link"> |
| 66 |
<a href="/login">Back to login<span class="dot">.</span></a> |
| 67 |
</div> |
| 68 |
</div> |
| 69 |
{% endblock %} |
| 70 |
|