From f0dedc42c26d9545fa81031cc85a62a2d186d554 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 4 Feb 2022 13:57:31 +0000 Subject: [PATCH 1/2] Format account locked view --- .../max_login_attempts_reached.html.erb | 11 +++++++++++ config/locales/en.yml | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb diff --git a/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb b/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb new file mode 100644 index 000000000..3eae19de3 --- /dev/null +++ b/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb @@ -0,0 +1,11 @@ +<% content_for :title, I18n.t("devise.two_factor_authentication.max_login_attempts_reached") %> + +
+
+

+ <%= content_for(:title) %> +

+ +

<%= I18n.t("devise.two_factor_authentication.contact_administrator") %>

+
+
diff --git a/config/locales/en.yml b/config/locales/en.yml index 0aabc8da4..cccaed1e0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -126,8 +126,8 @@ en: two_factor_authentication: success: "Two factor authentication successful." attempt_failed: "Attempt failed." - max_login_attempts_reached: "Access completely denied as you have reached your attempts limit" - contact_administrator: "Please contact your system administrator." + max_login_attempts_reached: "Too many incorrect attempts, your account has been locked" + contact_administrator: "Contact another helpdesk administrator." code_has_been_sent: "Your security code has been sent." code_required: "Security code is required" code_incorrect: "Security code is incorrect" From 2ece8a45d0ea8b9a6a7cc04d37581151d2d080fb Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 4 Feb 2022 16:21:54 +0000 Subject: [PATCH 2/2] Update content --- .../max_login_attempts_reached.html.erb | 1 + config/locales/en.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb b/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb index 3eae19de3..7ff3d2d0e 100644 --- a/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb +++ b/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb @@ -6,6 +6,7 @@ <%= content_for(:title) %> +

<%= I18n.t("devise.two_factor_authentication.account_locked") %>

<%= I18n.t("devise.two_factor_authentication.contact_administrator") %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index cccaed1e0..8664dcf1f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -126,7 +126,8 @@ en: two_factor_authentication: success: "Two factor authentication successful." attempt_failed: "Attempt failed." - max_login_attempts_reached: "Too many incorrect attempts, your account has been locked" + max_login_attempts_reached: "Too many incorrect login attempts" + account_locked: "Your account has been locked for security reasons." contact_administrator: "Contact another helpdesk administrator." code_has_been_sent: "Your security code has been sent." code_required: "Security code is required"