Add check if user is locked, show link unlock instructions

This commit is contained in:
Urban Rotnik 2020-08-06 15:18:20 +02:00
parent 6853caa0c8
commit 3c3a2bfb8b

View file

@ -17,7 +17,7 @@
<%= link_to t("devise.links.not_receive_confirmation"), new_confirmation_path(resource_name) %><br />
<% 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) %><br />
<% end -%>