From 3c3a2bfb8bf63016a9331a5ea7a4eb2f82b72438 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Thu, 6 Aug 2020 15:18:20 +0200 Subject: [PATCH] Add check if user is locked, show link unlock instructions --- app/views/users/shared/_links.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/shared/_links.html.erb b/app/views/users/shared/_links.html.erb index 11b16ffd5..1d520d0f6 100644 --- a/app/views/users/shared/_links.html.erb +++ b/app/views/users/shared/_links.html.erb @@ -17,7 +17,7 @@ <%= link_to t("devise.links.not_receive_confirmation"), new_confirmation_path(resource_name) %>
<% end -%> - <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> + <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' && flash[:alert] == t('devise.failure.locked') %> <%= link_to t("devise.links.not_receive_unlock"), new_unlock_path(resource_name) %>
<% end -%>