Use `button_to` instead of `link_to` for post in security settings

This commit is contained in:
Karina Kwiatek 2022-01-15 17:52:56 +01:00 committed by Karina Kwiatek
parent f13e84319e
commit 04177cc135
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
%p Your account is set up to require the use of a one-time password in order to log in.
%p You currently have #{recovery_code_count} unused recovery codes.
= link_to t('views.actions.remove'), destroy_user_2fa_path, class: 'btn btn-danger', method: 'delete',
= button_to t('views.actions.remove'), destroy_user_2fa_path, class: 'btn btn-danger', method: 'delete',
data: { confirm: t('views.settings.security.2fa.detach_confirm') }
= link_to 'Re-generate recovery codes', reset_user_recovery_codes_path, class: 'btn btn-primary', method: 'delete',
= button_to 'Re-generate recovery codes', reset_user_recovery_codes_path, class: 'btn btn-primary', method: 'delete',
data: { confirm: 'Are you sure? This will disable your previous set of recovery codes.' }