Migrate form_tag
to form_with
in admin and auth views (#30692)
This commit is contained in:
parent
a7264a2b42
commit
8d5ed19c6d
13 changed files with 122 additions and 69 deletions
|
@ -14,14 +14,17 @@
|
|||
%li= filter_link_to t('admin.accounts.location.local'), target_origin: 'local'
|
||||
%li= filter_link_to t('admin.accounts.location.remote'), target_origin: 'remote'
|
||||
|
||||
= form_tag admin_reports_url, method: 'GET', class: 'simple_form' do
|
||||
= form_with url: admin_reports_url, method: :get, class: :simple_form do |form|
|
||||
.fields-group
|
||||
- ReportFilter::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?
|
||||
|
||||
- %i(by_target_domain).each do |key|
|
||||
.input.string.optional
|
||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.reports.#{key}")
|
||||
= form.text_field key,
|
||||
value: params[key],
|
||||
class: 'string optional',
|
||||
placeholder: I18n.t("admin.reports.#{key}")
|
||||
|
||||
.actions
|
||||
%button.button= t('admin.accounts.search')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue