48 lines
1.6 KiB
HTML
48 lines
1.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="forgot-password-container">
|
|
<h2>Reset Password</h2>
|
|
|
|
<form method="POST">
|
|
<div>
|
|
<label for="username">Username</label>
|
|
<input type="text" name="username" id="username" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="reset_token">Reset Token</label>
|
|
<!-- Check if a token is passed in the GET request, if so, fill it in the input field -->
|
|
<input type="text" name="reset_token" id="reset_token" value="{{ request.args.get('token') }}" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="new_password">New Password</label>
|
|
<input type="password" name="new_password" id="new_password" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="confirm_password">Confirm New Password</label>
|
|
<input type="password" name="confirm_password" id="confirm_password" required>
|
|
</div>
|
|
|
|
<button type="submit">Reset Password</button>
|
|
</form>
|
|
|
|
<!-- Display error or success messages -->
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="message-container">
|
|
{% for category, message in messages %}
|
|
<p class="error">{{ message }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<br>
|
|
|
|
<a href="{{ url_for('login') }}">Back to Login</a>
|
|
</div>
|
|
{% endblock %}
|