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

@ -5,16 +5,16 @@
%hr.spacer/
= form_tag admin_follow_recommendations_path, method: 'GET', class: 'simple_form' do
= form_with url: admin_follow_recommendations_path, method: :get, class: :simple_form do |form|
- RelationshipFilter::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 :language,
options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, @language)
= form.select :language,
options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, @language)
.filter-subset
%strong= t('admin.follow_recommendations.status')
%ul