-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
113 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
{% load account socialaccount %} | ||
|
||
{% block head_title %}{% trans "Sign In" %}{% endblock %} | ||
|
||
{% block head_title %} | ||
{% trans "Sign In" %} | ||
{% endblock %} | ||
{% block content %} | ||
<h1>{% trans "Two-Factor Authentication" %}</h1> | ||
|
||
<p>{% blocktranslate %}Your account is protected by two-factor authentication. Please enter an authenticator code:{% endblocktranslate %}</p> | ||
|
||
<form class="authenticate" method="POST" action="{% url 'mfa_authenticate' %}"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Sign In" %}</button> | ||
</form> | ||
|
||
<h1>{% trans "Two-Factor Authentication" %}</h1> | ||
<p> | ||
{% blocktranslate %}Your account is protected by two-factor authentication. Please enter an authenticator code:{% endblocktranslate %} | ||
</p> | ||
<form class="authenticate" | ||
method="POST" | ||
action="{% url 'mfa_authenticate' %}"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Sign In" %}</button> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block head_title %}{% trans "Two-Factor Authentication" %}{% endblock %} | ||
|
||
{% block head_title %} | ||
{% trans "Two-Factor Authentication" %} | ||
{% endblock %} | ||
{% block content %} | ||
<h1>{% trans "Two-Factor Authentication" %}</h1> | ||
|
||
<section class="totp"> | ||
<h2>{% translate "TOTP Authentication" %}</h2> | ||
|
||
{% if authenticators.totp %} | ||
<p>{% translate "TOTP Authentication is active. " %}</p> | ||
|
||
<ul class="actions"> | ||
<li><a href="{% url 'mfa_deactivate_totp' %}">{% translate "Deactivate" %}</a></li> | ||
</ul> | ||
|
||
{% else %} | ||
<p>{% translate "TOTP Authentication is not set up. " %}</p> | ||
|
||
<ul class="actions"> | ||
<li><a href="{% url 'mfa_activate_totp' %}">{% translate "Activate" %}</a></li> | ||
</ul> | ||
{% endif %} | ||
</section> | ||
|
||
<section class="recovery_codes" %}> | ||
<h2>{% translate "Recovery Codes" %}</h2> | ||
|
||
{% if authenticators.recovery_codes %} | ||
|
||
<p>{% blocktranslate with total_count=authenticators.recovery_codes.generate_codes|length count unused_count=authenticators.recovery_codes.get_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> | ||
|
||
<ul class="actions"> | ||
<li><a href="{% url 'mfa_view_recovery_codes' %}">{% translate "View codes" %}</a></li> | ||
<li><a href="{% url 'mfa_download_recovery_codes' %}">{% translate "Download codes" %}</a></li> | ||
<li><a href="{% url 'mfa_generate_recovery_codes' %}">{% translate "Generate new codes" %}</a></li> | ||
</ul> | ||
|
||
{% else %} | ||
<p>{% translate "No recovery codes set up." %}</p> | ||
{% endif %} | ||
</section> | ||
|
||
<h1>{% trans "Two-Factor Authentication" %}</h1> | ||
<section class="totp"> | ||
<h2>{% translate "Authenticator App" %}</h2> | ||
{% if authenticators.totp %} | ||
<p>{% translate "Authentication using an authenticator app is active." %}</p> | ||
<ul class="actions"> | ||
<li> | ||
<a href="{% url 'mfa_deactivate_totp' %}">{% translate "Deactivate" %}</a> | ||
</li> | ||
</ul> | ||
{% else %} | ||
<p>{% translate "An authenticator app is not active." %}</p> | ||
<ul class="actions"> | ||
<li> | ||
<a href="{% url 'mfa_activate_totp' %}">{% translate "Activate" %}</a> | ||
</li> | ||
</ul> | ||
{% endif %} | ||
</section> | ||
<section class="recovery_codes" %}> | ||
<h2>{% translate "Recovery Codes" %}</h2> | ||
{% if authenticators.recovery_codes %} | ||
<p> | ||
{% blocktranslate with total_count=authenticators.recovery_codes.generate_codes|length count unused_count=authenticators.recovery_codes.get_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> | ||
<ul class="actions"> | ||
<li> | ||
<a href="{% url 'mfa_view_recovery_codes' %}">{% translate "View codes" %}</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'mfa_download_recovery_codes' %}">{% translate "Download codes" %}</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'mfa_generate_recovery_codes' %}">{% translate "Generate new codes" %}</a> | ||
</li> | ||
</ul> | ||
{% else %} | ||
<p>{% translate "No recovery codes set up." %}</p> | ||
{% endif %} | ||
</section> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{% load i18n %} | ||
{% blocktrans %}TOTP authentication activated.{% endblocktrans %} | ||
{% blocktrans %}Authenticator app activated.{% endblocktrans %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{% load i18n %} | ||
{% blocktrans %}TOTP authentication deactivated.{% endblocktrans %} | ||
{% blocktrans %}Authenticator app deactivated.{% endblocktrans %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block head_title %}{% trans "Recovery Codes" %}{% endblock %} | ||
{% block head_title %} | ||
{% trans "Recovery Codes" %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +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 %} | ||
<form method="POST" action="{% url 'mfa_generate_recovery_codes' %}"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Generate" %}</button> | ||
</form> | ||
|
||
<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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +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 }} | ||
<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> | ||
|
||
<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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
{% extends "mfa/totp/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block content %} | ||
<h1>{% trans "Activate TOTP" %}</h1> | ||
|
||
{{ totp_svg|safe }} | ||
|
||
<form method="POST" action="{% url 'mfa_activate_totp' %}"> | ||
{% csrf_token %} | ||
<p> | ||
<label>{% translate "Authenticator secret" %}:</label> | ||
<input type="text" disabled="disabled" value="{{ form.secret }}" size="{{ form.secret|length }}"> | ||
</p> | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Activate" %}</button> | ||
</form> | ||
|
||
<h1>{% trans "Activate Authenticator App" %}</h1> | ||
{{ totp_svg|safe }} | ||
<form method="POST" action="{% url 'mfa_activate_totp' %}"> | ||
{% csrf_token %} | ||
<p> | ||
<label>{% translate "Authenticator secret" %}:</label> | ||
<input type="text" | ||
disabled="disabled" | ||
value="{{ form.secret }}" | ||
size="{{ form.secret|length }}"> | ||
</p> | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Activate" %}</button> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block head_title %}{% trans "TOTP Authentication" %}{% endblock %} | ||
{% block head_title %} | ||
{% trans "Authenticator App" %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
{% extends "mfa/totp/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block content %} | ||
<h1>{% trans "Deactivate TOTP" %}</h1> | ||
|
||
<p>{% blocktranslate %}You are about to remove TOTP based Two-Factor | ||
Authentication from your account. Are you sure?{% endblocktranslate %} | ||
<form method="POST" action="{% url 'mfa_deactivate_totp' %}"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Deactivate" %}</button> | ||
</form> | ||
|
||
<h1>{% trans "Deactivate Authenticator App" %}</h1> | ||
<p> | ||
{% blocktranslate %}You are about to deactivate authenticator app based authentication. Are you sure?{% endblocktranslate %} | ||
</p> | ||
<form method="POST" action="{% url 'mfa_deactivate_totp' %}"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">{% trans "Deactivate" %}</button> | ||
</form> | ||
{% endblock %} |