Add reject pattern to Admin setting
This commit is contained in:
parent
bcc8f0c032
commit
66ce3f9a5e
3 changed files with 31 additions and 0 deletions
9
app/controllers/admin/settings/others_controller.rb
Normal file
9
app/controllers/admin/settings/others_controller.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Admin::Settings::OthersController < Admin::SettingsController
|
||||
private
|
||||
|
||||
def after_update_redirect_path
|
||||
admin_settings_others_path
|
||||
end
|
||||
end
|
|
@ -24,6 +24,9 @@
|
|||
|
||||
%h4= t('admin.settings.others.activitypub')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_pattern, wrapper: :with_block_label, as: :text, label: t('admin.settings.reject_pattern.title'), hint: t('admin.settings.reject_pattern.desc_html'), input_html: { rows: 8 }
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_pattern, wrapper: :with_block_label, as: :text, label: t('admin.settings.reject_pattern.title'), hint: t('admin.settings.reject_pattern.desc_html'), input_html: { rows: 8 }
|
||||
|
||||
|
|
19
app/views/admin/settings/others/show.html.haml
Normal file
19
app/views/admin/settings/others/show.html.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
- content_for :page_title do
|
||||
= t('admin.settings.others.title')
|
||||
|
||||
- content_for :heading do
|
||||
%h2= t('admin.settings.title')
|
||||
= render partial: 'admin/settings/shared/links'
|
||||
|
||||
= simple_form_for @admin_settings, url: admin_settings_others_path, html: { method: :patch } do |f|
|
||||
= render 'shared/error_messages', object: @admin_settings
|
||||
|
||||
%p.lead= t('admin.settings.others.preamble')
|
||||
|
||||
%h4= t('admin.settings.others.activitypub')
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_pattern, wrapper: :with_block_label, as: :text, label: t('admin.settings.reject_pattern.title'), hint: t('admin.settings.reject_pattern.desc_html'), input_html: { rows: 8 }
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
Loading…
Reference in a new issue