Migrate form_tag to form_with in admin and auth views (#30692)

This commit is contained in:
Matt Jankowski 2024-06-14 05:49:10 -04:00 committed by GitHub
commit 8d5ed19c6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 122 additions and 69 deletions

View file

@ -1,11 +1,13 @@
- content_for :page_title do
= t('auth.captcha_confirmation.title')
= form_tag auth_captcha_confirmation_url, method: 'POST', class: 'simple_form' do
= form_with url: auth_captcha_confirmation_url, class: :simple_form do |form|
= render 'auth/shared/progress', stage: 'confirm'
= hidden_field_tag :confirmation_token, params[:confirmation_token]
= hidden_field_tag :redirect_to_app, params[:redirect_to_app]
= form.hidden_field :confirmation_token,
value: params[:confirmation_token]
= form.hidden_field :redirect_to_app,
value: params[:redirect_to_app]
%h1.title= t('auth.captcha_confirmation.title')
%p.lead= t('auth.captcha_confirmation.hint_html')
@ -15,4 +17,6 @@
%p.lead= t('auth.captcha_confirmation.help_html', email: mail_to(Setting.site_contact_email, nil))
.actions
= button_tag t('challenge.confirm'), class: 'button', type: :submit
= form.button t('challenge.confirm'),
class: 'button',
type: :submit