Skip to content

Replace `data-confirm` modals with `GlModal` in `app/views/admin/application_settings/appearances/_form.html.haml`

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-labels.

Screenshots or screen recordings

Before (×3) Remove header logo Remove favicon Remove [Sign in/Sign up pages] logo
image image 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/application_settings/appearance.
  3. Upload a header logo, a favicon, and a Sign in/Sign up pages logo.
  4. Click the "Remove header logo", "Remove favicon" and "Remove [Sign in/Sign up pages] logo" buttons.
  5. 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