diff --git a/src/fellchensammlung/templates/allauth/elements/field.html b/src/fellchensammlung/templates/allauth/elements/field.html new file mode 100644 index 0000000..e626913 --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/field.html @@ -0,0 +1,50 @@ +{% load allauth %} +
+ + {% if attrs.type == "textarea" %} + + + {% else %} + {% if attrs.type != "checkbox" and attrs.type != "radio" %} + + {% endif %} + + {% if attrs.type == "checkbox" or attrs.type == "radio" %} + + {% endif %} + {% endif %} + {% if slots.help_text %} +

+ {% slot help_text %} + {% endslot %} +

+ {% endif %} +

{{ attrs.errors }}

+
\ No newline at end of file diff --git a/src/fellchensammlung/templates/allauth/elements/panel.html b/src/fellchensammlung/templates/allauth/elements/panel.html new file mode 100644 index 0000000..9ee3562 --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/panel.html @@ -0,0 +1,18 @@ +{% load allauth %} +
+

+ {% slot title %} + {% endslot %} +

+ {% slot body %} + {% endslot %} + {% if slots.actions %} +
+ {% for action in slots.actions %} +
+ {{ action }} +
+ {% endfor %} +
+ {% endif %} +
diff --git a/src/fellchensammlung/templates/mfa/recovery_codes/index.html b/src/fellchensammlung/templates/mfa/recovery_codes/index.html new file mode 100644 index 0000000..00f83f9 --- /dev/null +++ b/src/fellchensammlung/templates/mfa/recovery_codes/index.html @@ -0,0 +1,43 @@ +{% extends "mfa/recovery_codes/base.html" %} +{% load i18n %} +{% load allauth %} +{% block content %} +{% element h1 %} +{% translate "Recovery Codes" %} +{% endelement %} +{% element 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 %} +{% endelement %} +
+{% element field id="recovery_codes" type="textarea" disabled=True rows=unused_codes|length readonly=True %} +{% slot label %} +{% translate "Unused codes" %} +{% endslot %} +{% comment %} djlint:off {% endcomment %} +{% slot value %}{% for code in unused_codes %}{% if forloop.counter0 %} +{% endif %}{{ code }}{% endfor %}{% endslot %} +{% comment %} djlint:on {% endcomment %} +{% endelement %} +
+
+
+{% if unused_codes %} +{% url 'mfa_download_recovery_codes' as download_url %} +
+{% element button href=download_url %} +{% translate "Download codes" %} +{% endelement %} +
+{% endif %} +{% url 'mfa_generate_recovery_codes' as generate_url %} + +
+{% element button href=generate_url %} +{% translate "Generate new codes" %} +{% endelement %} +
+
+
+{% endblock content %}