Improve Report Notes and Account Moderation Notes (#30288)

This commit is contained in:
Emelia Smith 2024-05-15 15:38:36 +02:00 committed by GitHub
parent c2ca3d152f
commit 5fd56512de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 47 additions and 22 deletions

View file

@ -62,14 +62,16 @@
.report-notes
= render partial: 'admin/report_notes/report_note', collection: @moderation_notes
= simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |f|
= f.hidden_field :target_account_id
= simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |form|
= form.hidden_field :target_account_id
= render 'shared/error_messages', object: @account_moderation_note
.field-group
= f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
= form.input :content, input_html: { placeholder: t('admin.reports.notes.placeholder'), maxlength: AccountModerationNote::CONTENT_SIZE_LIMIT, rows: 6, autofocus: @account_moderation_note.errors.any? }
.actions
= f.button :button, t('admin.account_moderation_notes.create'), type: :submit
= form.button :button, t('admin.account_moderation_notes.create'), type: :submit
%hr.spacer/

View file

@ -83,15 +83,17 @@
.report-notes
= render @report_notes
= simple_form_for @report_note, url: admin_report_notes_path do |f|
= f.input :report_id, as: :hidden
= simple_form_for @report_note, url: admin_report_notes_path do |form|
= form.input :report_id, as: :hidden
= render 'shared/error_messages', object: @report_note
.field-group
= f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
= form.input :content, input_html: { placeholder: t('admin.reports.notes.placeholder'), maxlength: ReportNote::CONTENT_SIZE_LIMIT, rows: 6, autofocus: @report_note.errors.any? }
.actions
- if @report.unresolved?
= f.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
= form.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
- else
= f.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit
= f.button :button, t('admin.reports.notes.create'), type: :submit
= form.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit
= form.button :button, t('admin.reports.notes.create'), type: :submit