From db64ae368fd6b5530b4d4211f82902b36dc01bc0 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 12 Feb 2026 10:19:43 -0500 Subject: [PATCH] Use implicit `class_names` in 2FA partials (#37846) --- .../auth/sessions/two_factor/_otp_authentication_form.html.haml | 2 +- app/views/auth/sessions/two_factor/_webauthn_form.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml b/app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml index 6062d33a1b..9f4b01a613 100644 --- a/app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml +++ b/app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml @@ -1,7 +1,7 @@ = simple_form_for(resource, as: resource_name, url: session_path(resource_name), - html: { method: :post, id: 'otp-authentication-form' }.merge(hidden ? { class: 'hidden' } : {})) do |f| + html: { method: :post, id: 'otp-authentication-form', class: [hidden:] }) do |f| %p.hint.authentication-hint= t('simple_form.hints.sessions.otp') .fields-group diff --git a/app/views/auth/sessions/two_factor/_webauthn_form.html.haml b/app/views/auth/sessions/two_factor/_webauthn_form.html.haml index 32ed1294aa..abddf9db84 100644 --- a/app/views/auth/sessions/two_factor/_webauthn_form.html.haml +++ b/app/views/auth/sessions/two_factor/_webauthn_form.html.haml @@ -5,7 +5,7 @@ = simple_form_for(resource, as: resource_name, url: session_path(resource_name), - html: { method: :post, id: 'webauthn-form' }.merge(hidden ? { class: 'hidden' } : {})) do |f| + html: { method: :post, id: 'webauthn-form', class: [hidden:] }) do |f| %h3.title= t('simple_form.title.sessions.webauthn') %p.hint= t('simple_form.hints.sessions.webauthn')