From dbd8ce831bf82f6fb9b1e82b98cc91ed9e7e76b6 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 17 Jun 2025 12:42:07 -0400 Subject: [PATCH] Use namespace style in admin area forms --- app/views/admin/announcements/edit.html.haml | 2 +- app/views/admin/announcements/new.html.haml | 2 +- app/views/admin/custom_emojis/new.html.haml | 2 +- app/views/admin/domain_allows/new.html.haml | 2 +- app/views/admin/domain_blocks/edit.html.haml | 2 +- app/views/admin/domain_blocks/new.html.haml | 2 +- app/views/admin/email_domain_blocks/new.html.haml | 2 +- app/views/admin/invites/index.html.haml | 2 +- app/views/admin/ip_blocks/new.html.haml | 2 +- app/views/admin/relays/new.html.haml | 2 +- app/views/admin/rules/edit.html.haml | 2 +- app/views/admin/rules/new.html.haml | 2 +- app/views/admin/username_blocks/edit.html.haml | 2 +- app/views/admin/username_blocks/new.html.haml | 2 +- app/views/admin/webhooks/edit.html.haml | 2 +- app/views/admin/webhooks/new.html.haml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/views/admin/announcements/edit.html.haml b/app/views/admin/announcements/edit.html.haml index 8cec7d36c2d..5f2022be680 100644 --- a/app/views/admin/announcements/edit.html.haml +++ b/app/views/admin/announcements/edit.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('.title') -= simple_form_for @announcement, url: admin_announcement_path(@announcement), html: { novalidate: false } do |form| += simple_form_for [:admin, @announcement], html: { novalidate: false } do |form| = render 'shared/error_messages', object: @announcement = render form diff --git a/app/views/admin/announcements/new.html.haml b/app/views/admin/announcements/new.html.haml index 266ca65e80e..e7adb98f2f5 100644 --- a/app/views/admin/announcements/new.html.haml +++ b/app/views/admin/announcements/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('.title') -= simple_form_for @announcement, url: admin_announcements_path, html: { novalidate: false } do |form| += simple_form_for [:admin, @announcement], html: { novalidate: false } do |form| = render 'shared/error_messages', object: @announcement = render form diff --git a/app/views/admin/custom_emojis/new.html.haml b/app/views/admin/custom_emojis/new.html.haml index e59ae02b3bc..acf2231b8ec 100644 --- a/app/views/admin/custom_emojis/new.html.haml +++ b/app/views/admin/custom_emojis/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('.title') -= simple_form_for @custom_emoji, url: admin_custom_emojis_path do |f| += simple_form_for [:admin, @custom_emoji] do |f| = render 'shared/error_messages', object: @custom_emoji .fields-group diff --git a/app/views/admin/domain_allows/new.html.haml b/app/views/admin/domain_allows/new.html.haml index 85ab7e46441..d8cefee997d 100644 --- a/app/views/admin/domain_allows/new.html.haml +++ b/app/views/admin/domain_allows/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.domain_allows.add_new') -= simple_form_for @domain_allow, url: admin_domain_allows_path do |f| += simple_form_for [:admin, @domain_allow] do |f| = render 'shared/error_messages', object: @domain_allow .fields-group diff --git a/app/views/admin/domain_blocks/edit.html.haml b/app/views/admin/domain_blocks/edit.html.haml index cd52953a40c..b47e0fcdcca 100644 --- a/app/views/admin/domain_blocks/edit.html.haml +++ b/app/views/admin/domain_blocks/edit.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.domain_blocks.edit') -= simple_form_for @domain_block, url: admin_domain_block_path(@domain_block) do |form| += simple_form_for [:admin, @domain_block] do |form| = render 'shared/error_messages', object: @domain_block = render form diff --git a/app/views/admin/domain_blocks/new.html.haml b/app/views/admin/domain_blocks/new.html.haml index 78bcfcba8e7..5f80c9b4f6f 100644 --- a/app/views/admin/domain_blocks/new.html.haml +++ b/app/views/admin/domain_blocks/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('.title') -= simple_form_for @domain_block, url: admin_domain_blocks_path do |form| += simple_form_for [:admin, @domain_block] do |form| = render 'shared/error_messages', object: @domain_block = render form diff --git a/app/views/admin/email_domain_blocks/new.html.haml b/app/views/admin/email_domain_blocks/new.html.haml index 4db8fbe5e54..6508ef1d3b8 100644 --- a/app/views/admin/email_domain_blocks/new.html.haml +++ b/app/views/admin/email_domain_blocks/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('.title') -= simple_form_for @email_domain_block, url: admin_email_domain_blocks_path do |f| += simple_form_for [:admin, @email_domain_block] do |f| = render 'shared/error_messages', object: @email_domain_block .fields-group diff --git a/app/views/admin/invites/index.html.haml b/app/views/admin/invites/index.html.haml index 964deaba8f3..1507b816c97 100644 --- a/app/views/admin/invites/index.html.haml +++ b/app/views/admin/invites/index.html.haml @@ -14,7 +14,7 @@ - if policy(:invite).create? %p= t('invites.prompt') - = simple_form_for(@invite, url: admin_invites_path) do |form| + = simple_form_for [:admin, @invite] do |form| = render partial: 'invites/form', object: form %hr.spacer/ diff --git a/app/views/admin/ip_blocks/new.html.haml b/app/views/admin/ip_blocks/new.html.haml index 81493012c60..acf632e476a 100644 --- a/app/views/admin/ip_blocks/new.html.haml +++ b/app/views/admin/ip_blocks/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('.title') -= simple_form_for @ip_block, url: admin_ip_blocks_path do |f| += simple_form_for [:admin, @ip_block] do |f| = render 'shared/error_messages', object: @ip_block .fields-group diff --git a/app/views/admin/relays/new.html.haml b/app/views/admin/relays/new.html.haml index 126794acfe5..4decb467b8e 100644 --- a/app/views/admin/relays/new.html.haml +++ b/app/views/admin/relays/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.relays.add_new') -= simple_form_for @relay, url: admin_relays_path do |f| += simple_form_for [:admin, @relay] do |f| = render 'shared/error_messages', object: @relay .field-group diff --git a/app/views/admin/rules/edit.html.haml b/app/views/admin/rules/edit.html.haml index b64a27d7512..944480fa5a8 100644 --- a/app/views/admin/rules/edit.html.haml +++ b/app/views/admin/rules/edit.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.rules.edit') -= simple_form_for @rule, url: admin_rule_path(@rule) do |form| += simple_form_for [:admin, @rule] do |form| = render 'shared/error_messages', object: @rule = render form diff --git a/app/views/admin/rules/new.html.haml b/app/views/admin/rules/new.html.haml index bc93c7df55c..6c703ef8ff0 100644 --- a/app/views/admin/rules/new.html.haml +++ b/app/views/admin/rules/new.html.haml @@ -5,7 +5,7 @@ %hr.spacer/ -= simple_form_for @rule, url: admin_rules_path do |form| += simple_form_for [:admin, @rule] do |form| = render 'shared/error_messages', object: @rule = render form diff --git a/app/views/admin/username_blocks/edit.html.haml b/app/views/admin/username_blocks/edit.html.haml index eee0fedef07..c869bb53df4 100644 --- a/app/views/admin/username_blocks/edit.html.haml +++ b/app/views/admin/username_blocks/edit.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.username_blocks.edit.title') -= simple_form_for @username_block, url: admin_username_block_path(@username_block) do |form| += simple_form_for [:admin, @username_block] do |form| = render 'shared/error_messages', object: @username_block = render form diff --git a/app/views/admin/username_blocks/new.html.haml b/app/views/admin/username_blocks/new.html.haml index 0f5bd27952b..a63aad5f345 100644 --- a/app/views/admin/username_blocks/new.html.haml +++ b/app/views/admin/username_blocks/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.username_blocks.new.title') -= simple_form_for @username_block, url: admin_username_blocks_path do |form| += simple_form_for [:admin, @username_block] do |form| = render 'shared/error_messages', object: @username_block = render form diff --git a/app/views/admin/webhooks/edit.html.haml b/app/views/admin/webhooks/edit.html.haml index abc9bdfabc4..7e7658f7264 100644 --- a/app/views/admin/webhooks/edit.html.haml +++ b/app/views/admin/webhooks/edit.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.webhooks.edit') -= simple_form_for @webhook, url: admin_webhook_path(@webhook) do |form| += simple_form_for [:admin, @webhook] do |form| = render form .actions = form.button :button, t('generic.save_changes'), type: :submit diff --git a/app/views/admin/webhooks/new.html.haml b/app/views/admin/webhooks/new.html.haml index 50fcdc2be7f..be589111db1 100644 --- a/app/views/admin/webhooks/new.html.haml +++ b/app/views/admin/webhooks/new.html.haml @@ -1,7 +1,7 @@ - content_for :page_title do = t('admin.webhooks.new') -= simple_form_for @webhook, url: admin_webhooks_path do |form| += simple_form_for [:admin, @webhook] do |form| = render form .actions = form.button :button, t('admin.webhooks.add_new'), type: :submit