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
parent a7264a2b42
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

@ -5,15 +5,17 @@
%hr.spacer/
= form_tag admin_trends_statuses_path, method: 'GET', class: 'simple_form' do
= form_with url: admin_trends_statuses_path, method: :get, class: :simple_form do |form|
- Trends::StatusFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
= form.hidden_field key, value: params[key] if params[key].present?
.filters
.filter-subset.filter-subset--with-select
%strong= t('admin.follow_recommendations.language')
.input.select.optional
= select_tag :locale, options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), include_blank: true
= form.select :locale,
options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]),
include_blank: true
.filter-subset
%strong= t('admin.trends.trending')
%ul