From c07c10c610f8efe7033a3b9caa845577e140568f Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 31 Aug 2026 12:22:55 -0400 Subject: [PATCH] Fix Guest Approve Modal Offscreen issue, added guest header and spruced up the UI a bit --- admin/api_keys.php | 6 +- admin/mail_queue.php | 4 +- agent/asset.php | 4 +- agent/assets.php | 4 +- agent/certificates.php | 4 +- agent/contacts.php | 4 +- agent/credentials.php | 4 +- agent/domains.php | 4 +- agent/expenses.php | 4 +- agent/files.php | 6 +- agent/income.php | 4 +- agent/invoices.php | 4 +- agent/locations.php | 4 +- agent/network.php | 4 +- agent/networks.php | 4 +- agent/products.php | 4 +- agent/project.php | 4 +- agent/recurring_tickets.php | 4 +- agent/ticket_list.php | 4 +- agent/vendors.php | 4 +- guest/guest_approve_ticket_task.php | 118 ++++++++++++++++++++-------- guest/includes/guest_header.php | 7 ++ 22 files changed, 134 insertions(+), 75 deletions(-) diff --git a/admin/api_keys.php b/admin/api_keys.php index 4c7eea1e3..4ab7c78e5 100644 --- a/admin/api_keys.php +++ b/admin/api_keys.php @@ -67,9 +67,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
- +
@@ -117,7 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/admin/mail_queue.php b/admin/mail_queue.php index 5a59efa51..c51cb0275 100644 --- a/admin/mail_queue.php +++ b/admin/mail_queue.php @@ -74,7 +74,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
@@ -140,7 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/asset.php b/agent/asset.php index b15ceccf7..a23ff0f44 100644 --- a/agent/asset.php +++ b/agent/asset.php @@ -548,7 +548,7 @@ if (isset($_GET['asset_id'])) { "> - -
+
@@ -606,7 +606,7 @@ if (isset($_GET['asset_id'])) { } ?>
+
diff --git a/agent/assets.php b/agent/assets.php index e62c54992..3e62841ec 100644 --- a/agent/assets.php +++ b/agent/assets.php @@ -463,7 +463,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+
@@ -666,7 +666,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/certificates.php b/agent/certificates.php index 767495ba3..795338b77 100644 --- a/agent/certificates.php +++ b/agent/certificates.php @@ -193,7 +193,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
@@ -264,7 +264,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/contacts.php b/agent/contacts.php index 56880f60c..b072ab56b 100644 --- a/agent/contacts.php +++ b/agent/contacts.php @@ -293,7 +293,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
@@ -466,7 +466,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/credentials.php b/agent/credentials.php index 716f7d388..07b8cbc6e 100644 --- a/agent/credentials.php +++ b/agent/credentials.php @@ -278,7 +278,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - "> -
+
@@ -416,7 +416,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/domains.php b/agent/domains.php index c4d2270de..df9ae8903 100644 --- a/agent/domains.php +++ b/agent/domains.php @@ -217,7 +217,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+
@@ -320,7 +320,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/expenses.php b/agent/expenses.php index 71fa98d2a..dee986761 100644 --- a/agent/expenses.php +++ b/agent/expenses.php @@ -208,7 +208,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
@@ -287,7 +287,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/files.php b/agent/files.php index 8d7340cba..956516df8 100644 --- a/agent/files.php +++ b/agent/files.php @@ -949,7 +949,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) "> - - - text-nowrap table-light border-top"> = 3 && lookupUserPermission("module_financial") >= 3) { ?> - = 3 && lookupUserPermission("module_financial") >= 3) { ?> -
+
@@ -1017,7 +1017,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) } ?>
+
@@ -1163,7 +1163,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) } ?>
+
diff --git a/agent/income.php b/agent/income.php index c9becdd54..02b50a3e5 100644 --- a/agent/income.php +++ b/agent/income.php @@ -374,7 +374,7 @@ $summary_total_income = floatval($row['total_income']);
+
@@ -474,7 +474,7 @@ $summary_total_income = floatval($row['total_income']);
+
diff --git a/agent/invoices.php b/agent/invoices.php index 9f56b88d7..34d837f6d 100644 --- a/agent/invoices.php +++ b/agent/invoices.php @@ -270,7 +270,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+
@@ -381,7 +381,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/locations.php b/agent/locations.php index 7279379a7..bc96482cb 100644 --- a/agent/locations.php +++ b/agent/locations.php @@ -221,7 +221,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
@@ -328,7 +328,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/network.php b/agent/network.php index ef7699569..46c78565a 100644 --- a/agent/network.php +++ b/agent/network.php @@ -227,7 +227,7 @@ if (mysqli_num_rows($sql) == 0) { "> - -
+
@@ -261,7 +261,7 @@ if (mysqli_num_rows($sql) == 0) { ?>
+
diff --git a/agent/networks.php b/agent/networks.php index 08171e498..7e0bd9bc4 100644 --- a/agent/networks.php +++ b/agent/networks.php @@ -202,7 +202,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); "> - -
+
@@ -294,7 +294,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/products.php b/agent/products.php index e54a7b6c5..e5bec22c8 100644 --- a/agent/products.php +++ b/agent/products.php @@ -176,7 +176,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+
@@ -254,7 +254,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/project.php b/agent/project.php index 158cd13a9..d7ba75d7e 100644 --- a/agent/project.php +++ b/agent/project.php @@ -346,7 +346,7 @@ if (isset($_GET['project_id'])) { - -
+
@@ -463,7 +463,7 @@ if (isset($_GET['project_id'])) { ?>
+
diff --git a/agent/recurring_tickets.php b/agent/recurring_tickets.php index 052faf123..387bc8f29 100644 --- a/agent/recurring_tickets.php +++ b/agent/recurring_tickets.php @@ -222,7 +222,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+
@@ -301,7 +301,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/agent/ticket_list.php b/agent/ticket_list.php index d7a780121..bd9a5cdfe 100644 --- a/agent/ticket_list.php +++ b/agent/ticket_list.php @@ -144,7 +144,7 @@ if ($tickets) { "> - title=""> -
+
@@ -321,7 +321,7 @@ if ($tickets) {
+
diff --git a/agent/vendors.php b/agent/vendors.php index 59e6b82f0..819fb1d14 100644 --- a/agent/vendors.php +++ b/agent/vendors.php @@ -119,7 +119,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); text-nowrap"> - -
+
@@ -198,7 +198,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
+
diff --git a/guest/guest_approve_ticket_task.php b/guest/guest_approve_ticket_task.php index 5caee1f09..059d05537 100644 --- a/guest/guest_approve_ticket_task.php +++ b/guest/guest_approve_ticket_task.php @@ -38,7 +38,7 @@ $approval_id = intval($_GET['task_approval_id']); $url_key = escapeSql($_GET['url_key']); $task_row = mysqli_fetch_assoc(mysqli_query($mysqli, - "SELECT approval_scope, approval_status, approval_type, task_id, task_name, ticket_details, + "SELECT approval_status, task_id, task_name, ticket_details, ticket_number, ticket_prefix, ticket_priority, ticket_status_name, ticket_subject FROM task_approvals LEFT JOIN tasks ON approval_task_id = task_id LEFT JOIN tickets on task_ticket_id = ticket_id @@ -57,8 +57,6 @@ if (!$task_row) { $task_id = intval($task_row['task_id']); $task_name = escapeHtml($task_row['task_name']); -$approval_scope = escapeHtml($task_row['approval_scope']); -$approval_type = escapeHtml($task_row['approval_type']); $approval_status = escapeHtml($task_row['approval_status']); $ticket_prefix = escapeHtml($task_row['ticket_prefix']); @@ -68,47 +66,101 @@ $ticket_priority = escapeHtml($task_row['ticket_priority']); $ticket_subject = escapeHtml($task_row['ticket_subject']); $ticket_details = $purifier->purify($task_row['ticket_details']); +// Same priority colours the agent ticket list uses, so a ticket reads the same +// to the client as it does to the tech looking at it +if ($ticket_priority == "Urgent") { + $ticket_priority_color = "dark"; +} elseif ($ticket_priority == "High") { + $ticket_priority_color = "danger"; +} elseif ($ticket_priority == "Medium") { + $ticket_priority_color = "warning"; +} else { + $ticket_priority_color = "info"; +} + +$approve_link = "guest_post.php?approve_ticket_task=$task_id&approval_id=$approval_id&approval_url_key=$url_key"; + ?> +
-
-

- Task Approval for Ticket -

+
+

Task Approval

+
+ +
+ + +

You have been asked to approve the following task

+ + +

+ +

+ Ticket +

+ + + + + + + Not expecting this? Get in touch using the details below. + + + + +
+ Approved — nothing further is needed. +
+ + + +
+ Declined — this task was not approved. +
+ + + +
+
+ +
+
+
Ticket details
+
+ + +
-
Subject:
-

- State: -
- Priority: -
-

-
-
Task Approval
-

- Task Name: -
- Scope/Type: -
- Status: -
- - Action: Approve Task - -

-
-
+

+ + | + +

- + + + +