You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.4 KiB

  1. - content_for :page_title do
  2. = t('admin.account_actions.title', acct: @account.acct)
  3. = simple_form_for @account_action, url: admin_account_action_path(@account.id) do |f|
  4. = f.input :report_id, as: :hidden
  5. .fields-group
  6. = f.input :type, as: :radio_buttons, collection: Admin::AccountAction.types_for_account(@account), include_blank: false, wrapper: :with_block_label, label_method: ->(type) { safe_join([I18n.t("simple_form.labels.admin_account_action.types.#{type}"), content_tag(:span, I18n.t("simple_form.hints.admin_account_action.types.#{type}"), class: 'hint')])}, hint: t('simple_form.hints.admin_account_action.type_html', acct: @account.acct)
  7. - if @account.local?
  8. %hr.spacer/
  9. .fields-group
  10. = f.input :send_email_notification, as: :boolean, wrapper: :with_label
  11. - if params[:report_id].present?
  12. .fields-group
  13. = f.input :include_statuses, as: :boolean, wrapper: :with_label
  14. %hr.spacer/
  15. - unless @warning_presets.empty?
  16. .fields-group
  17. = f.input :warning_preset_id, collection: @warning_presets, label_method: ->(warning_preset) { [warning_preset.title.presence, truncate(warning_preset.text)].compact.join(' - ') }, wrapper: :with_block_label
  18. .fields-group
  19. = f.input :text, as: :text, wrapper: :with_block_label, hint: t('simple_form.hints.admin_account_action.text_html', path: admin_warning_presets_path)
  20. .actions
  21. = f.button :button, t('admin.account_actions.action'), type: :submit