From dff2e150a2b9c5a4beaa9331dc29d3b3e1782128 Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Sun, 7 Dec 2025 22:12:59 +0000 Subject: [PATCH] Add more detailed modal debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Log modal element to verify it exists - Check for existing modal instance before creating new one - Log each step of modal creation and show process This helps identify why modal.show() isn't displaying the modal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/views/admin/get_all_users.html.erb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/views/admin/get_all_users.html.erb b/app/views/admin/get_all_users.html.erb index cba47c0..ca82ec7 100755 --- a/app/views/admin/get_all_users.html.erb +++ b/app/views/admin/get_all_users.html.erb @@ -56,7 +56,17 @@ function openEditModal(id){ $("#editAcct .modal-content").load(link, function(response, status, xhr) { console.log('Load status:', status); if (status == "success") { - var modal = new bootstrap.Modal(document.getElementById('editAcct')); + 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(); } else { console.error('Failed to load modal content:', xhr.statusText);