From f091d942821d47ac6fdd39cf9e645cfe83e80958 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 30 May 2024 14:53:49 -0400 Subject: [PATCH] Ticket Response UI Update Public Comment and Internal Note work now, added Events and Tasks to the Responses stil WIP there --- js/ticket_button_respond_note.js | 19 -------- post/ticket.php | 2 +- ticket.php | 84 ++++++++++++++------------------ 3 files changed, 37 insertions(+), 68 deletions(-) delete mode 100644 js/ticket_button_respond_note.js diff --git a/js/ticket_button_respond_note.js b/js/ticket_button_respond_note.js deleted file mode 100644 index bc345a46..00000000 --- a/js/ticket_button_respond_note.js +++ /dev/null @@ -1,19 +0,0 @@ -// Ticket.php - Changes the wording of the "Respond" button to "Add note" if reply is not a public update (based on checkbox) - -// Get Internal/Public Checkbox -let checkbox = document.getElementById('ticket_reply_type_checkbox'); - -// Get Respond button -let respond = document.getElementById('ticket_add_reply'); - -// When checkbox is checked/unchecked, update button wording -checkbox.addEventListener('change', e => { - if (e.target.checked) { - // Public reply - respond.innerHTML = "Respond"; - - } else { - // Internal note - respond.innerHTML = "Add note"; - } -}); diff --git a/post/ticket.php b/post/ticket.php index 972a5611..1228b23e 100644 --- a/post/ticket.php +++ b/post/ticket.php @@ -1105,7 +1105,7 @@ if (isset($_POST['add_ticket_reply'])) { $client_id = intval($_POST['client_id']); - if (isset($_POST['public_reply_type'])) { + if ($_POST['public_reply_type'] == 1 ){ $ticket_reply_type = 'Public'; } else { $ticket_reply_type = 'Internal'; diff --git a/ticket.php b/ticket.php index 20ea5729..13f60770 100644 --- a/ticket.php +++ b/ticket.php @@ -523,22 +523,21 @@ if (isset($_GET['ticket_id'])) { - -
-
Public Comment
-
Internal Note
-
-
+ +
+
+ + +
+
+
@@ -609,37 +608,8 @@ if (isset($_GET['ticket_id'])) {
- - - - - -
-
-
- > - -
-
-
-
- +
@@ -651,16 +621,34 @@ if (isset($_GET['ticket_id'])) {
@@ -668,6 +656,7 @@ if (isset($_GET['ticket_id'])) {
Public Comments
Internal Notes
Events
+
Tasks
@@ -1142,7 +1131,6 @@ require_once "footer.php"; -