Use jQuery modal API instead of Bootstrap 5 native API
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 <noreply@anthropic.com>
This commit is contained in:
@@ -56,18 +56,9 @@ function openEditModal(id){
|
|||||||
$("#editAcct .modal-content").load(link, function(response, status, xhr) {
|
$("#editAcct .modal-content").load(link, function(response, status, xhr) {
|
||||||
console.log('Load status:', status);
|
console.log('Load status:', status);
|
||||||
if (status == "success") {
|
if (status == "success") {
|
||||||
var modalElement = document.getElementById('editAcct');
|
console.log('Showing modal with jQuery');
|
||||||
console.log('Modal element:', modalElement);
|
// Use jQuery/Bootstrap method which handles initialization automatically
|
||||||
|
$('#editAcct').modal('show');
|
||||||
// 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 {
|
} else {
|
||||||
console.error('Failed to load modal content:', xhr.statusText);
|
console.error('Failed to load modal content:', xhr.statusText);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user