Replace `data-confirm` modals with `GlModal` in `app/views/admin/abuse_reports/_abuse_report.html.haml`
requested to merge 344182-replace-data-confirm-modals-with-glmodal-in-app-views-admin-abuse_reports-_abuse_report-html into master
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 |
---|---|
![]() |
![]() |
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the feature flag
Feature.enable(:bootstrap_confirmation_modals)
- Visit
http://127.0.0.1:3000/admin/abuse_reports
. You might need to create test reports first. - Click the Abuse Reports "Remove user & report" or "Block user" buttons.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.