diff --git a/app/views/admin/get_all_users.html.erb b/app/views/admin/get_all_users.html.erb index c56307e..cba47c0 100755 --- a/app/views/admin/get_all_users.html.erb +++ b/app/views/admin/get_all_users.html.erb @@ -51,9 +51,17 @@ function openEditModal(id){ var link = '/admin/'+ id +'/get_user'; - $("#editAcct .modal-content").load(link); - var modal = new bootstrap.Modal(document.getElementById('editAcct')); - modal.show(); + console.log('Loading modal content from:', link); + + $("#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')); + modal.show(); + } else { + console.error('Failed to load modal content:', xhr.statusText); + } + }); }; function dataTablePagination(){ diff --git a/app/views/admin/get_user.html.erb b/app/views/admin/get_user.html.erb index 9fcfe17..806fbab 100755 --- a/app/views/admin/get_user.html.erb +++ b/app/views/admin/get_user.html.erb @@ -34,7 +34,7 @@
<%= f.label :admin, nil, {:class => "form-label"}%> - <%= f.select(:admin, @admin_select, {}, {:class => "form-select"}) %> + <%= f.select(:admin, @admin_select, {}, {:class => "form-select", :id => "user_admin", :name => "user[admin]"}) %>