diff --git a/generic_modal_loader.js b/generic_modal_loader.js deleted file mode 100644 index 25a66207..00000000 --- a/generic_modal_loader.js +++ /dev/null @@ -1,63 +0,0 @@ -// Generic Ajax Modal Load Script -// -/*Trigger Button using data-ajax attributes --> - -*/ -$(document).on('click', '.ajax-trigger', function (e) { - e.preventDefault(); - - // Get the URL and ID from the element's data attributes - var $trigger = $(this); - var ajaxUrl = $trigger.data('ajax-url'); - var ajaxId = $trigger.data('ajax-id'); - - // Make the AJAX call to fetch modal content - $.ajax({ - url: ajaxUrl, - method: 'GET', - data: { id: ajaxId }, - dataType: 'json', - success: function (response) { - if (response.error) { - alert(response.error); - return; - } - - // Create a unique modal ID (you can enhance this as needed) - var modalId = 'dynamicAjaxModal'; - - // Build the modal HTML using the returned title and content - var modalHtml = - ''; - - // Append the modal to the body and show it - $('body').append(modalHtml); - $('#' + modalId).modal('show'); - - // Remove the modal from the DOM once it's hidden - $('#' + modalId).on('hidden.bs.modal', function () { - $(this).remove(); - }); - }, - error: function () { - alert('Error loading modal content.'); - } - }); -}); \ No newline at end of file diff --git a/js/js_contact_edit.js b/js/js_contact_edit.js deleted file mode 100644 index 1b32605c..00000000 --- a/js/js_contact_edit.js +++ /dev/null @@ -1,11 +0,0 @@ -$(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.'); - }); -}); \ No newline at end of file diff --git a/modals/client_contact_edit_new_modal.php b/modals/client_contact_edit_new_modal.php deleted file mode 100644 index 8f85d40f..00000000 --- a/modals/client_contact_edit_new_modal.php +++ /dev/null @@ -1,19 +0,0 @@ - -