Skip to content

Replace `data-confirm` modals with `GlModal` in `app/views/admin/abuse_reports/_abuse_report.html.haml`

What does this MR do and why?

Related to #344182 (closed) as part of &6854 (closed).

The confirm modal works as expected for both "Remove user & report" and "Block user" buttons. And this MR:

  • Adds the data-confirm-btn-variant="danger" attribute to the dangered "Remove user & report" button.
  • Adds an aria-label to both buttons.

Screenshots or screen recordings

Before After
image image
Before After
image image

How to set up and validate locally

  1. Enable the feature flag
    Feature.enable(:bootstrap_confirmation_modals)
  2. Visit http://127.0.0.1:3000/admin/abuse_reports. You might need to create test reports first.
  3. Click the Abuse Reports "Remove user & report" or "Block user" buttons.
  4. The confirm modal should show the correspondent action and proceed with it.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports