Prevent default link navigation in admin user edit button
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 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<%= u.admin ? %{<span class="fs1" aria-label="check" data-icon=""}.html_safe : nil %>
|
||||
</td>
|
||||
<td>
|
||||
<%= 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"}%>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user