Started work on AJAX with a different approach, this is WIP but edit contact currently uses it. with this approach your dont have to touch the js or modal template just the ajax

This commit is contained in:
johnnyq
2025-02-15 00:50:52 -05:00
parent 117861034a
commit 74a1603943
9 changed files with 557 additions and 290 deletions
+11
View File
@@ -0,0 +1,11 @@
$(document).on('click', '.edit-contact-btn', function(e) {
e.preventDefault();
var contactId = $(this).data('contact-id');
$('#editContactContent').html('Loading...'); // optional loading text
$.get('ajax_edit_contact.php', { contact_id: contactId }, function(response) {
$('#editContactContent').html(response);
$('#editContactModal').modal('show');
}).fail(function() {
alert('Error loading contact details.');
});
});