From b3b1b0d01dbc7549e666a397085da9a029053cd4 Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Sun, 7 Dec 2025 22:14:00 +0000 Subject: [PATCH] Use jQuery modal API instead of Bootstrap 5 native API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch from bootstrap.Modal class to jQuery .modal('show') method. Bootstrap 5 still supports the jQuery plugin API for backwards compatibility, and this method handles initialization automatically. This should fix the issue where modal.show() was called but the modal wasn't appearing visually. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/views/admin/get_all_users.html.erb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/app/views/admin/get_all_users.html.erb b/app/views/admin/get_all_users.html.erb index ca82ec7..dc5f5a7 100755 --- a/app/views/admin/get_all_users.html.erb +++ b/app/views/admin/get_all_users.html.erb @@ -56,18 +56,9 @@ function openEditModal(id){ $("#editAcct .modal-content").load(link, function(response, status, xhr) { console.log('Load status:', status); if (status == "success") { - var modalElement = document.getElementById('editAcct'); - console.log('Modal element:', modalElement); - - // Get or create modal instance - var modal = bootstrap.Modal.getInstance(modalElement); - if (!modal) { - console.log('Creating new modal instance'); - modal = new bootstrap.Modal(modalElement); - } - - console.log('Showing modal'); - modal.show(); + console.log('Showing modal with jQuery'); + // Use jQuery/Bootstrap method which handles initialization automatically + $('#editAcct').modal('show'); } else { console.error('Failed to load modal content:', xhr.statusText); }