djbrown/hbscorez

View on GitHub
src/users/templates/users/password-reset-change.html

Summary

Maintainability
Test Coverage
{% extends "base/base.html" %}

{% load static %}

{% block title %}{{ title }}{% endblock %}
{% block content_title %}<h1>{{ title }}</h1>{% endblock %}
{% block content %}

{% if validlink %}
<p>Bitte gib zweimal Dein neues Passwort ein, damit Tippfehler ausgeschlossen werden.</p>

<form method="post">

    {% csrf_token %}

    <div class="mb-3">
        <label for="new_password1" class="form-label">Neues Passwort</label>
        <input name="new_password1" type="password" id="new_password1" placeholder="Passwort" required
            class="form-control{% if form.new_password2.errors %} is-invalid{% endif %}" />
        <small class="form-text text-muted">{{ form.new_password1.help_text|safe }}</small>
        <div class="invalid-feedback">{{ form.new_password2.errors }}</div>
    </div>

    <div class="mb-3">
        <label for="new_password2" class="form-label">Passwort bestätigen</label>
        <input name="new_password2" type="password" id="new_password2" placeholder="Passwort" required
            class="form-control{% if form.new_password2.errors %} is-invalid{% endif %}" />
        <small class="form-text text-muted">{{ form.new_password2.help_text|safe }}</small>
    </div>

    <input type="submit" value="Passwort ändern" class="btn btn-primary" />

</form>
{% else %}
<p>
    Der Link zum Zurücksetzen Deines Passworts war ungültig, möglicherweise weil er bereits benutzt wurde.
    Bitte setze Dein Passwort erneut zurück.
</p>
{% endif %}

{% endblock %}