From 425b06e5504883b7774228055797adadf7f56b6b Mon Sep 17 00:00:00 2001 From: wrongecho Date: Wed, 4 Dec 2024 16:43:09 +0000 Subject: [PATCH] Add time tracking for bulk ticket replies - TT for bulk replies - Encourage the correct time format using a placeholder and pattern (client-side validation only) --- post/user/ticket.php | 3 ++- ticket_bulk_reply_modal.php | 7 +++++++ ticket_reply_edit_modal.php | 3 +-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/post/user/ticket.php b/post/user/ticket.php index d484e6d6..9b42c07c 100644 --- a/post/user/ticket.php +++ b/post/user/ticket.php @@ -1019,6 +1019,7 @@ if (isset($_POST['bulk_ticket_reply'])) { // POST variables $ticket_reply = mysqli_escape_string($mysqli, $_POST['bulk_reply_details']); $ticket_status = intval($_POST['bulk_status']); + $ticket_reply_time_worked = sanitizeInput($_POST['time']); $private_note = intval($_POST['bulk_private_reply']); if ($private_note == 1) { $ticket_reply_type = 'Internal'; @@ -1046,7 +1047,7 @@ if (isset($_POST['bulk_ticket_reply'])) { $client_id = intval($row['ticket_client_id']); // Add reply - mysqli_query($mysqli, "INSERT INTO ticket_replies SET ticket_reply = '$ticket_reply', ticket_reply_time_worked = '00:01:00', ticket_reply_type = '$ticket_reply_type', ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id"); + mysqli_query($mysqli, "INSERT INTO ticket_replies SET ticket_reply = '$ticket_reply', ticket_reply_time_worked = '$ticket_reply_time_worked', ticket_reply_type = '$ticket_reply_type', ticket_reply_by = $session_user_id, ticket_reply_ticket_id = $ticket_id"); $ticket_reply_id = mysqli_insert_id($mysqli); diff --git a/ticket_bulk_reply_modal.php b/ticket_bulk_reply_modal.php index 2e2b2fa5..6e73ff76 100644 --- a/ticket_bulk_reply_modal.php +++ b/ticket_bulk_reply_modal.php @@ -35,6 +35,13 @@ +
+
+ + +
+
+
diff --git a/ticket_reply_edit_modal.php b/ticket_reply_edit_modal.php index 4d6e8ce3..6769fcb7 100644 --- a/ticket_reply_edit_modal.php +++ b/ticket_reply_edit_modal.php @@ -29,11 +29,10 @@
-
- +