diff --git a/src/pretix/control/templates/pretixcontrol/user/2fa_enable.html b/src/pretix/control/templates/pretixcontrol/user/2fa_enable.html index 39f41268d4..a052f370f0 100644 --- a/src/pretix/control/templates/pretixcontrol/user/2fa_enable.html +++ b/src/pretix/control/templates/pretixcontrol/user/2fa_enable.html @@ -1,6 +1,7 @@ {% extends "pretixcontrol/base.html" %} {% load i18n %} {% load bootstrap3 %} +{% load icon %} {% block title %}{% trans "Enable two-factor authentication" %}{% endblock %} {% block content %}
{% trans "You will no longer be able to log in to pretix without one of your configured devices." %} - {% trans "Please make sure to print out or copy the emergency tokens and store them in a safe place." %}
+ {% if new_emergency_tokens %} ++ {% blocktrans trimmed %} + If you lose access to your devices, you can use one of your emergency tokens to log in. + We recommend to store them in a safe place, e.g. printed out or in a password manager. + Every token can be used at most once. + {% endblocktrans %} +
++ +
++ {% icon "info-circle" %} + {% blocktrans trimmed with generation_date_time=static_tokens_device.created_at %} + You generated your emergency tokens on {{ generation_date_time }}. + {% endblocktrans %} +
+ {% endif %}+ {% icon "info-circle" %} {% blocktrans trimmed with generation_date_time=static_tokens_device.created_at %} You generated your emergency tokens on {{ generation_date_time }}. {% endblocktrans %}
- {% else %} + + + {% trans "Generate new emergency tokens" %} + + {% elif user.require_2fa %}- {% trans "You don't have any emergency tokens yet." %} + {% icon "warning" %} + {% trans "You don't have any emergency tokens yet." %} +
+ + + {% trans "Generate emergency tokens" %} + + {% else %} ++ {% icon "info-circle" %} + {% trans "Emergency tokens will be generated when you enable two-factor authentication." %}
{% endif %} - - - {% trans "Generate new emergency tokens" %} -