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
|
@ -21,14 +21,17 @@
|
|||
- else
|
||||
= filter_link_to t('admin.accounts.location.remote'), remote: '1', local: nil
|
||||
|
||||
= form_tag admin_custom_emojis_url, method: 'GET', class: 'simple_form' do
|
||||
= form_with url: admin_custom_emojis_url, method: :get, class: :simple_form do |form|
|
||||
.fields-group
|
||||
- CustomEmojiFilter::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(shortcode by_domain).each do |key|
|
||||
.input.string.optional
|
||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.custom_emojis.#{key}")
|
||||
= form.text_field key,
|
||||
value: params[key],
|
||||
class: 'string optional',
|
||||
placeholder: I18n.t("admin.custom_emojis.#{key}")
|
||||
|
||||
.actions
|
||||
%button.button= t('admin.accounts.search')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue