Replace `data-confirm` modals with `GlModal` in `app/views/admin/application_settings/appearances/_form.html.haml`
requested to merge 344177-replace-data-confirm-modals-with-glmodal-in-app-views-admin-application_settings-appearances into master
What does this MR do and why?
Related to #344177 (closed) as part of &6854 (closed).
The confirm modal works as expected for the "Remove header logo", "Remove favicon" and "Remove [Sign in/Sign up pages] logo" buttons. And this MR:
- Adds the
data-confirm-btn-variant="danger"
attribute. - Adds
aria-label
s.
Screenshots or screen recordings
Before (×3) | Remove header logo | Remove favicon | Remove [Sign in/Sign up pages] logo |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Enable the feature flag
Feature.enable(:bootstrap_confirmation_modals)
- Visit
http://127.0.0.1:3000/admin/application_settings/appearance
. - Upload a header logo, a favicon, and a Sign in/Sign up pages logo.
- Click the "Remove header logo", "Remove favicon" and "Remove [Sign in/Sign up pages] logo" 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.