first commit

This commit is contained in:
root
2024-09-20 04:29:09 +00:00
commit 5383007f49
459 changed files with 88755 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
{% extends "mfa/totp/base.html" %}
{% load allauth i18n %}
{% block head_title %}
{% translate "Activate Authenticator App" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% translate "Activate Authenticator App" %}
{% endelement %}
{% element p %}
{% blocktranslate %}To protect your account with two-factor authentication, scan the QR code below with your authenticator app. Then, input the verification code generated by the app below.{% endblocktranslate %}
{% endelement %}
{% url 'mfa_activate_totp' as action_url %}
{% element form form=form method="post" action=action_url %}
{% slot body %}
{% element img src=totp_svg_data_uri alt=form.secret tags="mfa,totp,qr" %}
{% endelement %}
{% csrf_token %}
{% element field id="authenticator_secret" type="text" value=form.secret disabled=True %}
{% slot label %}
{% translate "Authenticator secret" %}
{% endslot %}
{% slot help_text %}
{% translate "You can store this secret and use it to reinstall your authenticator app at a later time." %}
{% endslot %}
{% endelement %}
{% element fields form=form %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button type="submit" %}
{% trans "Activate" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endblock content %}

5
templates/mfa/totp/base.html Executable file
View File

@@ -0,0 +1,5 @@
{% extends "mfa/base_manage.html" %}
{% load i18n %}
{% block head_title %}
{% trans "Authenticator App" %}
{% endblock head_title %}

View File

@@ -0,0 +1,28 @@
{% extends "mfa/totp/base.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Deactivate Authenticator App" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Deactivate Authenticator App" %}
{% endelement %}
{% element p %}
{% blocktranslate %}You are about to deactivate authenticator app based authentication. Are you sure?{% endblocktranslate %}
{% endelement %}
{% url 'mfa_deactivate_totp' as action_url %}
{% element form form=form method="post" action=action_url no_visible_fields=True %}
{% slot body %}
{% csrf_token %}
{% element fields form=form %}
{{ form.as_p }}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button tags="danger,delete" type="submit" %}
{% trans "Deactivate" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% endblock content %}