From aefc7a23bcf3c4bc2c492eec384ce853974b988f Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Fri, 14 Oct 2022 21:54:52 +1100 Subject: [PATCH] fix 2fa templates - translate all strings - do not embed svg element inside svg element - fix sizing of input for confirming 2fa setup --- bookwyrm/templates/preferences/2fa.html | 26 +++++++++---------- .../two_factor_auth/two_factor_login.html | 1 + .../two_factor_auth/two_factor_prompt.html | 7 ++--- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/bookwyrm/templates/preferences/2fa.html b/bookwyrm/templates/preferences/2fa.html index 5d56e828d..b0703bc4a 100644 --- a/bookwyrm/templates/preferences/2fa.html +++ b/bookwyrm/templates/preferences/2fa.html @@ -32,7 +32,7 @@ {% elif request.user.two_factor_auth %}
-

Two Factor Authentication is active on your account.

+

{% trans "Two Factor Authentication is active on your account." %}

{% trans "Disable 2FA" %}
@@ -42,21 +42,21 @@ {% elif password_confirmed %}
{% csrf_token %} -

Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up.

-
- - {{ qrcode | safe }} - +

{% trans "Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up." %}

+
+
+
{{ qrcode | safe }}
+
+ + {{ form.otp }} + {% include 'snippets/form_errors.html' with errors_list=form.otp.errors id="desc_otp" %} +
+ +
-
- - {{ form.otp }} - {% include 'snippets/form_errors.html' with errors_list=form.otp.errors id="desc_otp" %} -
- {% else %} -

+

{% trans "You can make your account more secure by using Two Factor Authentication (2FA). This will require you to enter a one-time code using a phone app like Authy, Google Authenticator or Microsoft Authenticator each time you log in." %}

{% trans "Confirm your password to begin setting up 2FA." %}

diff --git a/bookwyrm/templates/two_factor_auth/two_factor_login.html b/bookwyrm/templates/two_factor_auth/two_factor_login.html index f4a2fdf04..bea1c4f0e 100644 --- a/bookwyrm/templates/two_factor_auth/two_factor_login.html +++ b/bookwyrm/templates/two_factor_auth/two_factor_login.html @@ -44,6 +44,7 @@
+