From 04177cc135fa69533b88d66d131610ce352f7fc3 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 15 Jan 2022 17:52:56 +0100 Subject: [PATCH] Use `button_to` instead of `link_to` for post in security settings --- app/views/settings/security/_totp_enabled.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/settings/security/_totp_enabled.haml b/app/views/settings/security/_totp_enabled.haml index 5e15f872..f4afacd8 100644 --- a/app/views/settings/security/_totp_enabled.haml +++ b/app/views/settings/security/_totp_enabled.haml @@ -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.' }