Added data-toggle='ajax-modal' to trigger the ajax modal instead, also added an ajax header and and footer to dedup code

This commit is contained in:
johnnyq
2025-02-15 14:50:48 -05:00
parent 298a584377
commit 9458c1cc7a
6 changed files with 29 additions and 23 deletions

View File

@@ -156,7 +156,10 @@ if (isset($_GET['contact_id'])) {
<div class="card card-dark">
<div class="card-body">
<button type="button" class="btn btn-default float-right" data-toggle="modal" data-target="#editContactModal<?php echo $contact_id; ?>">
<button type="button" class="btn btn-default float-right"
data-toggle="ajax-modal"
data-ajax-url="ajax/ajax_contact_edit.php"
data-ajax-id="<?php echo $contact_id; ?>">
<i class="fas fa-fw fa-user-edit"></i>
</button>
<h3 class="text-bold"><?php echo $contact_name; ?></h3>
@@ -213,7 +216,6 @@ if (isset($_GET['contact_id'])) {
<?php } ?>
<div class="mt-2"><i class="fa fa-fw fa-clock text-secondary mr-2"></i><?php echo date('Y-m-d', strtotime($contact_created_at)); ?></div>
<?php require_once "modals/client_contact_edit_modal.php";
?>
</div>