76 lines
3.6 KiB
HTML
76 lines
3.6 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
{% load allauth account %}
|
|
|
|
{% block head_title %}
|
|
{% trans "Change Password" %}
|
|
{% endblock head_title %}
|
|
|
|
{% block content %}
|
|
<!-- Change Password Section Start -->
|
|
<section class="space-py-100">
|
|
<div class="container">
|
|
<div class="grid grid-cols-12">
|
|
<div class="col-span-12">
|
|
<div class="codex-authbox">
|
|
<div class="auth-header">
|
|
<div class="codex-brand">
|
|
<a href="{% url 'main:home' %}">
|
|
<img class="img-fluid light-logo" src="{% static 'main/assets/images/logo/logo.webp' %}" alt="logo">
|
|
<img class="img-fluid dark-logo" src="{% static 'main/assets/images/logo/logo-light.webp' %}" alt="logo">
|
|
</a>
|
|
</div>
|
|
<h3>
|
|
{% if token_fail %}
|
|
{% trans "Bad Token" %}
|
|
{% else %}
|
|
{% trans "Change Password" %}
|
|
{% endif %}
|
|
</h3>
|
|
</div>
|
|
{% if token_fail %}
|
|
{% url 'account_reset_password' as passwd_reset_url %}
|
|
<p>
|
|
{% blocktrans %}
|
|
The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.
|
|
{% endblocktrans %}
|
|
</p>
|
|
{% else %}
|
|
{% url 'account_set_password' as action_url %}
|
|
<form method="post" action="{{ action_url }}">
|
|
{% csrf_token %}
|
|
{{ redirect_field }}
|
|
<div class="mb-4">
|
|
{% for field in form.visible_fields %}
|
|
<div class="form-group">
|
|
{{ field.label_tag }}
|
|
{{ field }}
|
|
{% if field.help_text %}
|
|
<small class="form-text text-muted">{{ field.help_text }}</small>
|
|
{% endif %}
|
|
{% for error in field.errors %}
|
|
<div class="text-danger">{{ error }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<button type="submit" name="action" class="btn btn-primary">
|
|
{% trans 'Change Password' %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<!-- Change Password Section End -->
|
|
{% endblock content %}
|
|
|
|
{% block extra_body %}
|
|
{{ block.super }}
|
|
{% endblock extra_body %}
|