mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-26 04:55:07 +01:00
Use shared form partial for admin/rules
views (#30067)
This commit is contained in:
parent
a9816f051d
commit
e336466894
7
app/views/admin/rules/_form.html.haml
Normal file
7
app/views/admin/rules/_form.html.haml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.fields-group
|
||||||
|
= form.input :text,
|
||||||
|
wrapper: :with_block_label
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= form.input :hint,
|
||||||
|
wrapper: :with_block_label
|
@ -1,14 +1,10 @@
|
|||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('admin.rules.edit')
|
= t('admin.rules.edit')
|
||||||
|
|
||||||
= simple_form_for @rule, url: admin_rule_path(@rule) do |f|
|
= simple_form_for @rule, url: admin_rule_path(@rule) do |form|
|
||||||
= render 'shared/error_messages', object: @rule
|
= render 'shared/error_messages', object: @rule
|
||||||
|
|
||||||
.fields-group
|
= render form
|
||||||
= f.input :text, wrapper: :with_block_label
|
|
||||||
|
|
||||||
.fields-group
|
|
||||||
= f.input :hint, wrapper: :with_block_label
|
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
= f.button :button, t('generic.save_changes'), type: :submit
|
= form.button :button, t('generic.save_changes'), type: :submit
|
||||||
|
@ -6,17 +6,13 @@
|
|||||||
%hr.spacer/
|
%hr.spacer/
|
||||||
|
|
||||||
- if can? :create, :rule
|
- if can? :create, :rule
|
||||||
= simple_form_for @rule, url: admin_rules_path do |f|
|
= simple_form_for @rule, url: admin_rules_path do |form|
|
||||||
= render 'shared/error_messages', object: @rule
|
= render 'shared/error_messages', object: @rule
|
||||||
|
|
||||||
.fields-group
|
= render form
|
||||||
= f.input :text, wrapper: :with_block_label
|
|
||||||
|
|
||||||
.fields-group
|
|
||||||
= f.input :hint, wrapper: :with_block_label
|
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
= f.button :button, t('admin.rules.add_new'), type: :submit
|
= form.button :button, t('admin.rules.add_new'), type: :submit
|
||||||
|
|
||||||
%hr.spacer/
|
%hr.spacer/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user