Convert `form_for` -> `form_with` in views (#30700)
This commit is contained in:
parent
980034e2e1
commit
b5d1d48266
|
@ -43,7 +43,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= form_for(@form, url: batch_admin_accounts_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_accounts_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
= hidden_field_tag :select_all_matching, '0'
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
%button.button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_custom_emojis_path, class: 'button negative'
|
||||
|
||||
= form_for(@form, url: batch_admin_custom_emojis_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_custom_emojis_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- CustomEmojiFilter::KEYS.each do |key|
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- content_for :heading_actions do
|
||||
= link_to t('admin.email_domain_blocks.add_new'), new_admin_email_domain_block_path, class: 'button'
|
||||
|
||||
= form_for(@form, url: batch_admin_email_domain_blocks_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_email_domain_blocks_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
.batch-table
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- if defined?(@global_private_comment) && @global_private_comment.present?
|
||||
%p= t('admin.export_domain_blocks.import.private_comment_description_html', comment: @global_private_comment)
|
||||
|
||||
= form_for(@form, url: batch_admin_domain_blocks_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_domain_blocks_path do |f|
|
||||
.batch-table
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
%li= filter_link_to t('admin.accounts.moderation.active'), status: nil
|
||||
%li= filter_link_to t('admin.follow_recommendations.suppressed'), status: 'suppressed'
|
||||
|
||||
= form_for(@form, url: admin_follow_recommendations_path, method: :patch) do |f|
|
||||
= form_with model: @form, url: admin_follow_recommendations_path, method: :patch do |f|
|
||||
- RelationshipFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- content_for :heading_actions do
|
||||
= link_to t('admin.ip_blocks.add_new'), new_admin_ip_block_path, class: 'button'
|
||||
|
||||
= form_for(@form, url: batch_admin_ip_blocks_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_ip_blocks_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
.batch-table
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= form_for(@form, url: batch_admin_accounts_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_accounts_path do |f|
|
||||
.batch-table
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
admin_account_statuses_path(@report.target_account_id, report_id: @report.id),
|
||||
class: 'table-action-link'
|
||||
|
||||
= form_for(@form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id)) do |f|
|
||||
= form_with model: @form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id) do |f|
|
||||
.batch-table
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= form_for(@status_batch_action, url: batch_admin_account_statuses_path(@account.id)) do |f|
|
||||
= form_with model: @status_batch_action, url: batch_admin_account_statuses_path(@account.id) do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Admin::StatusFilter::KEYS.each do |key|
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
= t('admin.trends.preview_card_providers.title')
|
||||
= material_symbol 'chevron_right'
|
||||
|
||||
= form_for(@form, url: batch_admin_trends_links_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_trends_links_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Trends::PreviewCardFilter::KEYS.each do |key|
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= form_for(@form, url: batch_admin_trends_links_preview_card_providers_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_trends_links_preview_card_providers_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Trends::PreviewCardProviderFilter::KEYS.each do |key|
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
%li= filter_link_to t('generic.all'), trending: nil
|
||||
%li= filter_link_to t('admin.trends.only_allowed'), trending: 'allowed'
|
||||
|
||||
= form_for(@form, url: batch_admin_trends_statuses_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_trends_statuses_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Trends::StatusFilter::KEYS.each do |key|
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%li= filter_link_to t('admin.trends.rejected'), status: 'rejected'
|
||||
%li= filter_link_to safe_join([t('admin.accounts.moderation.pending'), "(#{Tag.pending_review.count})"], ' '), status: 'pending_review'
|
||||
|
||||
= form_for(@form, url: batch_admin_trends_tags_path) do |f|
|
||||
= form_with model: @form, url: batch_admin_trends_tags_path do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Trends::TagFilter::KEYS.each do |key|
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= form_for(@status_filter_batch_action, url: batch_filter_statuses_path(@filter.id)) do |f|
|
||||
= form_with model: @status_filter_batch_action, url: batch_filter_statuses_path(@filter.id) do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Admin::StatusFilter::KEYS.each do |key|
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
%li= filter_link_to t('relationships.most_recent'), order: nil
|
||||
%li= filter_link_to t('relationships.last_active'), order: 'active'
|
||||
|
||||
= form_for(@form, url: relationships_path, method: :patch) do |f|
|
||||
= form_with model: @form, url: relationships_path, method: :patch do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- RelationshipFilter::KEYS.each do |key|
|
||||
|
|
Loading…
Reference in New Issue