From 779bece7283f2b6cd3140421de8cb032526818c2 Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Sun, 7 Dec 2025 21:28:55 +0000 Subject: [PATCH] Prevent default link navigation in admin user edit button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 'return false;' to onClick handler to prevent the # href from causing page navigation/redirect to dashboard. This fixes the issue where clicking Edit would redirect to /admin/1/dashboard# instead of opening the modal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/views/admin/get_all_users.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/get_all_users.html.erb b/app/views/admin/get_all_users.html.erb index f26efe1..c56307e 100755 --- a/app/views/admin/get_all_users.html.erb +++ b/app/views/admin/get_all_users.html.erb @@ -29,7 +29,7 @@ <%= u.admin ? %{ - <%= link_to "Edit", "#", {:onClick => "javascript:openEditModal(#{u.id});", :role => "button", :style => "width:70px", :class => "btn btn-inverse"}%> + <%= link_to "Edit", "#", {:onClick => "javascript:openEditModal(#{u.id}); return false;", :role => "button", :style => "width:70px", :class => "btn btn-inverse"}%> <% end %>