1
0
Fork 0
forked from muyrety/Smarter
Smarter/smarter/templates/auth/pwreset-set.j2
Arija A. a3a6316054
.html -> .j2 for Jinja2 correctness
Signed-off-by: Arija A. <ari@ari.lt>
2025-05-27 23:34:42 +03:00

51 lines
2.9 KiB
Django/Jinja

{% extends "base.j2" %}
{% block title %} Password reset {% endblock %}
{% block head %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<script src="{{ url_for('static', filename='js/register.js') }}"></script>
{% endblock %}
{% block main %}
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-4 col-md-5 col-sm-8">
<form method="post" action="{{ url_for('auth.pwreset') }}">
<div class="my-3">
<label for="token" class="text-primary-emphasis form-label">Token</label>
<input id="token" type="password" required autofocus autocomplete="off" name="token" class="text-success bg-info-subtle border border-success-subtle form-control">
</div>
<div class="mb-3">
<label for="password" class="form-label text-primary-emphasis">New password (8+ characters)</label>
<div class="input-group">
<input type="password" required pattern=".{8,}" name="password" id="password" autocomplete="off" class="form-control bg-info-subtle text-success border-success-subtle" value="{{ request.form.get('password', '') }}">
<span class="text-success bg-info-subtle border-success-subtle input-group-text" id="togglePassword" style="cursor: pointer;">
<i class="bi bi-eye-slash" id="passwordIcon"></i>
</span>
</div>
</div>
<div class="mb-3">
<label for="repeatPassword" class="form-label text-primary-emphasis">Repeat password</label>
<div class="input-group">
<input type="password" required pattern=".{8,}" name="repeatPassword" id="repeatPassword" autocomplete="off" class="form-control bg-info-subtle text-success border-success-subtle" value="{{ request.form.get('repeatPassword', '') }}">
<span class="text-success bg-info-subtle border-success-subtle input-group-text" id="toggleRepeatPassword" style="cursor: pointer;">
<i class="bi bi-eye-slash" id="repeatPasswordIcon"></i>
</span>
</div>
<div class="form-text text-primary-emphasis d-none" id="badPasswordField">Passwords do not match</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-outline-primary" id="registerButton">Reset password</button>
</div>
</form>
<p class="text-center my-3 text-muted">
This functionality is only available for users who have a set email. Please check your email INBOX or SPAM folder to get the confirmation token.
</p>
</div>
</div>
</div>
{% endblock %}