This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}
{% trans "Recovery Codes" %}
{% endblock head_title %}

View File

@@ -0,0 +1,2 @@
{% for code in unused_codes %}{{ code }}
{% endfor %}

View File

@@ -0,0 +1,13 @@
{% extends "mfa/recovery_codes/base.html" %}
{% load i18n %}
{% block content %}
<h1>{% translate "Recovery Codes" %}</h1>
<p>
{% blocktranslate %}You are about to generate a new set of recovery codes for your account. This action will invalidate your existing codes. Are you sure?{% endblocktranslate %}
</p>
<form method="POST" action="{% url 'mfa_generate_recovery_codes' %}">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">{% trans "Generate" %}</button>
</form>
{% endblock content %}

View File

@@ -0,0 +1,23 @@
{% extends "mfa/recovery_codes/base.html" %}
{% load i18n %}
{% block content %}
<h1>{% translate "Recovery Codes" %}</h1>
<p>
{% blocktranslate count unused_count=unused_codes|length %}There is {{ unused_count }} out of {{ total_count }} recovery codes available.{% plural %}There are {{ unused_count }} out of {{ total_count }} recovery codes available.{% endblocktranslate %}
</p>
{% if unused_codes %}
<textarea class="recovery-codes" rows="{{ unused_codes|length }}" readonly>{% for code in unused_codes %}{{ code }}
{% endfor %}
</textarea>
{% endif %}
<ul class="actions">
{% if unused_codes %}
<li>
<a href="{% url 'mfa_download_recovery_codes' %}">{% translate "Download codes" %}</a>
</li>
{% endif %}
<li>
<a href="{% url 'mfa_generate_recovery_codes' %}">{% translate "Generate new codes" %}</a>
</li>
</ul>
{% endblock content %}