From c5a91d0c68cf50d1a3a726fd24bd7023eb695859 Mon Sep 17 00:00:00 2001 From: SilviaAmAm Date: Wed, 15 Jan 2025 16:55:37 +0100 Subject: [PATCH] :sparkles: Add possibility to override the error message in the template Done in the context of https://github.com/maykinmedia/open-archiefbeheer/issues/353. --- maykin_2fa/templates/maykin_2fa/login.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/maykin_2fa/templates/maykin_2fa/login.html b/maykin_2fa/templates/maykin_2fa/login.html index f631172..e919ea5 100644 --- a/maykin_2fa/templates/maykin_2fa/login.html +++ b/maykin_2fa/templates/maykin_2fa/login.html @@ -27,12 +27,14 @@
{% if user.is_authenticated %} -

- {% blocktranslate trimmed with username=request.user.get_username %} - You are authenticated as {{ username }}, but are not authorized to - access this page. Would you like to login to a different account? - {% endblocktranslate %} -

+ {% block autherrornote %} +

+ {% blocktranslate trimmed with username=request.user.get_username %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? + {% endblocktranslate %} +

+ {% endblock %} {% endif %} {% if wizard.steps.current == 'token' %}