Skip to content

Replace `data-confirm` modals with `GlModal` in `app/views/profiles/two_factor_auths/show.html.haml`

What does this MR do and why?

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

The confirm modal works as expected for the "Delete [WebAuthn Device]" button. And this MR:

  • Adds the data-confirm-btn-variant="danger" attribute to the button.
  • Adds an aria-label attribute.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Enable the feature flag
    Feature.enable(:bootstrap_confirmation_modals)
  2. Optionally, enable HTTPS for the GDK.
  3. Visit https://gdk.test:3443/-/profile/two_factor_auth and register a WebAuthn Device. You might need to enable 2FA first.
  4. Click the WebAuthn Devices "Delete" button.
  5. The confirm modal should show "Delete", and it'd delete the device.

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