From df0c6a5bc86f1aee773e9287f610aa1eccdfa3f8 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 15 Oct 2026 22:20:25 -0400 Subject: [PATCH] Review pass over the modernized sections: add icons in front of the fields that were missing them (project form, bulk due and manager, project export; service form, depends-on pickers, bulk edit, review, link tickets and export; calendar event and calendar forms; rack and rack item forms; project template name; location and vendor extension; ticket bulk reply, bulk resolve and edit reply time worked; license renew date; client bulk ticket subject; credential share link), show names with apostrophes and quotes correctly in contact, asset, client, tag, ticket template and vendor template save messages, reword unclear or inconsistent messages and hints (ticket close, reply added, task approvals, bulk contact and asset messages, user and profile hints, VLAN, certificate and vendor PIN hints, with no vendor / location / network), singular and plural in bulk modal titles, US spelling in visible text, make the hidden attribute win over display utilities so the empty credential strength meter stays hidden, wrap pagination on narrow screens, and remove the unused credentialLink, projectLink and linkCounts helpers --- .../project_template/project_template_add.php | 5 +- .../project_template_edit.php | 5 +- admin/modals/user/user_form.php | 4 +- admin/post/demo_data_model.php | 2 +- admin/post/tag.php | 6 +- admin/post/ticket_template.php | 10 +- admin/post/vendor_template.php | 6 +- admin/settings_theme.php | 2 +- agent/assets.php | 4 +- agent/contacts.php | 4 +- agent/location.php | 2 +- agent/locations.php | 8 +- agent/modals/asset/asset_bulk_add_ticket.php | 2 +- .../asset/asset_bulk_assign_contact.php | 2 +- .../asset/asset_bulk_assign_location.php | 2 +- .../asset_bulk_assign_physical_location.php | 2 +- agent/modals/asset/asset_bulk_edit_status.php | 2 +- .../asset/asset_bulk_transfer_client.php | 2 +- .../asset/asset_interface_bulk_edit_vlans.php | 2 +- agent/modals/asset/asset_interface_form.php | 2 +- agent/modals/calendar/calendar_add.php | 7 +- agent/modals/calendar/calendar_edit.php | 7 +- agent/modals/calendar/calendar_event_form.php | 153 +++++++++++------- .../calendar/calendar_subscribe_help.php | 2 +- agent/modals/certificate/certificate_form.php | 2 +- .../modals/client/client_bulk_add_ticket.php | 7 +- .../client/client_bulk_edit_hourly_rate.php | 2 +- .../client/client_bulk_edit_industry.php | 2 +- .../client/client_bulk_edit_net_terms.php | 2 +- .../client/client_bulk_edit_referral.php | 2 +- agent/modals/client/client_bulk_email.php | 2 +- .../contact/contact_bulk_assign_location.php | 2 +- .../contact/contact_bulk_edit_department.php | 2 +- .../contact/contact_bulk_edit_phone.php | 2 +- .../modals/contact/contact_bulk_edit_role.php | 2 +- agent/modals/contact/contact_bulk_email.php | 2 +- agent/modals/credential/credential_share.php | 1 + agent/modals/location/location_form.php | 5 +- agent/modals/network/network_form.php | 2 +- agent/modals/project/project_bulk_due.php | 5 +- agent/modals/project/project_bulk_manager.php | 23 +-- agent/modals/project/project_export.php | 62 ++++--- agent/modals/project/project_form.php | 34 +++- agent/modals/rack/rack_device_form.php | 43 +++-- agent/modals/rack/rack_form.php | 52 +++--- agent/modals/service/service_bulk_edit.php | 35 ++-- agent/modals/service/service_export.php | 59 ++++--- agent/modals/service/service_form.php | 69 +++++--- agent/modals/service/service_link_ticket.php | 19 ++- agent/modals/service/service_review.php | 18 ++- agent/modals/software/software_renew.php | 5 +- .../modals/ticket/ticket_bulk_add_project.php | 2 +- agent/modals/ticket/ticket_bulk_assign.php | 2 +- .../ticket/ticket_bulk_edit_category.php | 2 +- .../ticket/ticket_bulk_edit_priority.php | 2 +- agent/modals/ticket/ticket_bulk_merge.php | 2 +- agent/modals/ticket/ticket_bulk_reply.php | 9 +- agent/modals/ticket/ticket_bulk_resolve.php | 11 +- agent/modals/ticket/ticket_invoice_add.php | 4 +- agent/modals/ticket/ticket_quote_add.php | 2 +- agent/modals/ticket/ticket_reply_edit.php | 5 +- agent/modals/vendor/vendor_form.php | 7 +- agent/network.php | 2 +- agent/networks.php | 4 +- agent/post/asset.php | 28 ++-- agent/post/client.php | 16 +- agent/post/contact.php | 32 ++-- agent/post/tag.php | 2 +- agent/post/task.php | 20 +-- agent/post/ticket.php | 14 +- agent/software.php | 4 +- agent/user/post/profile.php | 2 +- agent/user/user_details.php | 4 +- agent/vendor.php | 2 +- agent/vendors.php | 6 +- css/itflow_custom.css | 15 ++ functions/credential.php | 13 -- functions/links.php | 9 -- functions/project.php | 10 -- 79 files changed, 556 insertions(+), 379 deletions(-) diff --git a/admin/modals/project_template/project_template_add.php b/admin/modals/project_template/project_template_add.php index cdf0c6fad..6373d9d51 100644 --- a/admin/modals/project_template/project_template_add.php +++ b/admin/modals/project_template/project_template_add.php @@ -15,7 +15,10 @@ ob_start(); diff --git a/agent/modals/calendar/calendar_subscribe_help.php b/agent/modals/calendar/calendar_subscribe_help.php index dbf59ef2f..817930831 100644 --- a/agent/modals/calendar/calendar_subscribe_help.php +++ b/agent/modals/calendar/calendar_subscribe_help.php @@ -17,7 +17,7 @@ $help_apps = [ ]], 'outlook' => ['Outlook', 'fab fa-microsoft', [ 'In Outlook on the web or the new Outlook, open the calendar and choose Add calendar → Subscribe from web.', - 'Paste the link, give it a name and a colour, and Import. Classic Outlook: Account settings → Internet Calendars → New.', + 'Paste the link, give it a name and a color, and Import. Classic Outlook: Account settings → Internet Calendars → New.', 'Outlook refreshes subscribed calendars on its own schedule, usually every few hours.', ]], 'apple' => ['iPhone & Mac', 'fab fa-apple', [ diff --git a/agent/modals/certificate/certificate_form.php b/agent/modals/certificate/certificate_form.php index 578c2594c..75ba6125a 100644 --- a/agent/modals/certificate/certificate_form.php +++ b/agent/modals/certificate/certificate_form.php @@ -112,7 +112,7 @@ $has_pem = trim(html_entity_decode($certificate_public_key, ENT_QUOTES, 'UTF-8') -
The client's domain it is for - left to itself, the one the host is under.
+
The client's domain it is for. Left blank, it is the domain the host is under.
Matched to the client's domain the host is under when it's saved.
diff --git a/agent/modals/client/client_bulk_add_ticket.php b/agent/modals/client/client_bulk_add_ticket.php index f39e9dbae..05c22ca4b 100644 --- a/agent/modals/client/client_bulk_add_ticket.php +++ b/agent/modals/client/client_bulk_add_ticket.php @@ -12,7 +12,7 @@ ob_start(); ?> @@ -24,7 +24,10 @@ ob_start();
- +
+ + +
diff --git a/agent/modals/client/client_bulk_edit_hourly_rate.php b/agent/modals/client/client_bulk_edit_hourly_rate.php index 56a639bdb..bbd4738fc 100644 --- a/agent/modals/client/client_bulk_edit_hourly_rate.php +++ b/agent/modals/client/client_bulk_edit_hourly_rate.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/client/client_bulk_edit_industry.php b/agent/modals/client/client_bulk_edit_industry.php index b6dfce6a7..6ccdb8856 100644 --- a/agent/modals/client/client_bulk_edit_industry.php +++ b/agent/modals/client/client_bulk_edit_industry.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/client/client_bulk_edit_net_terms.php b/agent/modals/client/client_bulk_edit_net_terms.php index 1c9de12f2..d6da1df0e 100644 --- a/agent/modals/client/client_bulk_edit_net_terms.php +++ b/agent/modals/client/client_bulk_edit_net_terms.php @@ -22,7 +22,7 @@ ob_start(); ?> diff --git a/agent/modals/client/client_bulk_edit_referral.php b/agent/modals/client/client_bulk_edit_referral.php index 7732c66d3..bf7de723f 100644 --- a/agent/modals/client/client_bulk_edit_referral.php +++ b/agent/modals/client/client_bulk_edit_referral.php @@ -10,7 +10,7 @@ ob_start(); ?> diff --git a/agent/modals/client/client_bulk_email.php b/agent/modals/client/client_bulk_email.php index a2984f692..4f92c46f9 100644 --- a/agent/modals/client/client_bulk_email.php +++ b/agent/modals/client/client_bulk_email.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/contact/contact_bulk_assign_location.php b/agent/modals/contact/contact_bulk_assign_location.php index b3a60557c..58355f7b9 100644 --- a/agent/modals/contact/contact_bulk_assign_location.php +++ b/agent/modals/contact/contact_bulk_assign_location.php @@ -16,7 +16,7 @@ ob_start(); ?> diff --git a/agent/modals/contact/contact_bulk_edit_department.php b/agent/modals/contact/contact_bulk_edit_department.php index 8579a1e40..ca216a56a 100644 --- a/agent/modals/contact/contact_bulk_edit_department.php +++ b/agent/modals/contact/contact_bulk_edit_department.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/contact/contact_bulk_edit_phone.php b/agent/modals/contact/contact_bulk_edit_phone.php index c7cf94cbf..62a5c73f6 100644 --- a/agent/modals/contact/contact_bulk_edit_phone.php +++ b/agent/modals/contact/contact_bulk_edit_phone.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/contact/contact_bulk_edit_role.php b/agent/modals/contact/contact_bulk_edit_role.php index 3a32a487d..ad9bcbeb7 100644 --- a/agent/modals/contact/contact_bulk_edit_role.php +++ b/agent/modals/contact/contact_bulk_edit_role.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/contact/contact_bulk_email.php b/agent/modals/contact/contact_bulk_email.php index d53340abb..972990ba7 100644 --- a/agent/modals/contact/contact_bulk_email.php +++ b/agent/modals/contact/contact_bulk_email.php @@ -11,7 +11,7 @@ ob_start(); ?> diff --git a/agent/modals/credential/credential_share.php b/agent/modals/credential/credential_share.php index e51938700..ea8f02bd6 100644 --- a/agent/modals/credential/credential_share.php +++ b/agent/modals/credential/credential_share.php @@ -73,6 +73,7 @@ ob_start();
- +
+ + +
diff --git a/agent/modals/network/network_form.php b/agent/modals/network/network_form.php index b69315170..fb6e80d60 100644 --- a/agent/modals/network/network_form.php +++ b/agent/modals/network/network_form.php @@ -106,7 +106,7 @@ $value = function ($key) use ($form) {
- +
diff --git a/agent/modals/project/project_bulk_due.php b/agent/modals/project/project_bulk_due.php index 4c006574f..a98122c03 100644 --- a/agent/modals/project/project_bulk_due.php +++ b/agent/modals/project/project_bulk_due.php @@ -27,7 +27,10 @@ ob_start(); diff --git a/agent/modals/project/project_bulk_manager.php b/agent/modals/project/project_bulk_manager.php index 5aee59b78..4e2995bfa 100644 --- a/agent/modals/project/project_bulk_manager.php +++ b/agent/modals/project/project_bulk_manager.php @@ -27,16 +27,19 @@ ob_start(); diff --git a/agent/modals/project/project_export.php b/agent/modals/project/project_export.php index 35a8aed49..327f6b4f6 100644 --- a/agent/modals/project/project_export.php +++ b/agent/modals/project/project_export.php @@ -41,44 +41,56 @@ ob_start();
- +
+ + +
- +
+ + +
- +
+ + +
- +
+ + +
diff --git a/agent/modals/project/project_form.php b/agent/modals/project/project_form.php index acf8d068b..b00546034 100644 --- a/agent/modals/project/project_form.php +++ b/agent/modals/project/project_form.php @@ -19,7 +19,9 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
- - + +
@@ -35,7 +38,10 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
- +
+ + +
+
+ +
-
What support asks for before they will talk - shown beside the support line, the PIN as dots until it is asked for.
+
What support asks for to check it's you - shown beside the support line, with the PIN hidden until you click it.
diff --git a/agent/network.php b/agent/network.php index 4837c3e9e..22d475b8d 100644 --- a/agent/network.php +++ b/agent/network.php @@ -173,7 +173,7 @@ if (!$network || ($client_url && intval($network['network_client_id']) !== intva + data-confirm-text=" and the addresses documented on it go for good. The devices on it are left with no network."> Delete diff --git a/agent/networks.php b/agent/networks.php index 11707db2e..902136960 100644 --- a/agent/networks.php +++ b/agent/networks.php @@ -240,7 +240,7 @@ $csrf = $_SESSION['csrf_token']; @@ -405,7 +405,7 @@ $csrf = $_SESSION['csrf_token']; + data-confirm-text=" and the addresses documented on it go for good. The devices on it are left with no network."> Delete diff --git a/agent/post/asset.php b/agent/post/asset.php index 9b2a30e31..4ea899029 100644 --- a/agent/post/asset.php +++ b/agent/post/asset.php @@ -100,7 +100,7 @@ if (isset($_POST['add_asset'])) { logAudit("Asset", "Create", "$session_name created asset $name", $client_id, $asset_id); - flashAlert("Asset $name created$alert_extended"); + flashAlert("Asset " . stripslashes($name) . " created$alert_extended"); redirect(); @@ -180,7 +180,7 @@ if (isset($_POST['edit_asset'])) { logAudit("Asset", "Edit", "$session_name edited asset $name", $client_id, $asset_id); - flashAlert("Asset $name edited"); + flashAlert("Asset " . stripslashes($name) . " saved"); redirect(); @@ -209,7 +209,7 @@ if (isset($_GET['archive_asset'])) { logAudit("Asset", "Archive", "$session_name archived asset $asset_name", $client_id, $asset_id); - flashAlert("Asset $asset_name archived", 'error'); + flashAlert("Asset " . stripslashes($asset_name) . " archived", 'error'); redirect(); @@ -238,7 +238,7 @@ if (isset($_GET['restore_asset'])) { logAudit("Asset", "Restore", "$session_name restored asset $asset_name", $client_id, $asset_id); - flashAlert("Asset $asset_name Restored"); + flashAlert("Asset " . stripslashes($asset_name) . " restored"); redirect(); @@ -270,7 +270,7 @@ if (isset($_GET['delete_asset'])) { logAudit("Asset", "Delete", "$session_name deleted asset $asset_name", $client_id); - flashAlert("Asset $asset_name deleted"); + flashAlert("Asset " . stripslashes($asset_name) . " deleted", 'error'); redirect(); @@ -385,7 +385,7 @@ if (isset($_GET['delete_asset_note'])) { logAudit("Asset", "Edit", "$session_name deleted $asset_note_type note for $asset_name", $client_id, $asset_id); - flashAlert("Note $asset_note_type deleted.", 'error'); + flashAlert("Note $asset_note_type deleted", 'error'); redirect(); @@ -439,7 +439,7 @@ if (isset($_POST['bulk_assign_asset_location'])) { logAudit("Asset", "Bulk Edit", "$session_name assigned $asset_count assets to location $location_name", $location_client_id); - flashAlert("You assigned $asset_count assets to location $location_name"); + flashAlert("$asset_count asset" . ($asset_count === 1 ? '' : 's') . " assigned to location " . stripslashes($location_name) . ""); } redirect(); @@ -479,7 +479,7 @@ if (isset($_POST['bulk_assign_asset_physical_location'])) { logAudit("Asset", "Bulk Edit", "$session_name set $asset_count assets to physical location $physical_location", $client_id); - flashAlert("You moved $asset_count assets to location $physical_location"); + flashAlert("Physical location of $asset_count asset" . ($asset_count === 1 ? '' : 's') . " set to " . stripslashes($physical_location) . ""); } redirect(); @@ -571,7 +571,7 @@ if (isset($_POST['bulk_transfer_client_asset'])) { logAudit("Asset", "Bulk Transfer", "$session_name transferred $asset_count assets to $new_client_name", $new_client_id); - flashAlert("Transferred $asset_count assets to $new_client_name."); + flashAlert("Transferred $asset_count asset" . ($asset_count === 1 ? '' : 's') . " to " . stripslashes($new_client_name) . ""); } redirect(); @@ -622,7 +622,7 @@ if (isset($_POST['bulk_assign_asset_contact'])) { logAudit("Asset", "Bulk Edit", "$session_name assigned $asset_count assets to contact $contact_name", $client_id); - flashAlert("You assigned $asset_count assets to contact $contact_name"); + flashAlert("$asset_count asset" . ($asset_count === 1 ? '' : 's') . " assigned to " . stripslashes($contact_name) . ""); } redirect(); @@ -663,7 +663,7 @@ if (isset($_POST['bulk_edit_asset_status'])) { logAudit("Asset", "Bulk Edit", "$session_name set status to $status on $asset_count assets", $client_id); - flashAlert("You set the status $status on $asset_count assets."); + flashAlert("Status set to " . stripslashes($status) . " on $asset_count asset" . ($asset_count === 1 ? '' : 's')); } redirect(); @@ -821,7 +821,7 @@ if (isset($_POST['bulk_restore_assets'])) { logAudit("Asset", "Bulk Restore", "$session_name restored $count assets"); - flashAlert("Restored $count asset(s)"); + flashAlert("Restored $count asset(s)"); } @@ -908,7 +908,7 @@ if (isset($_POST['link_asset_to_credential'])) { logAudit("Credential", "Link", "$session_name linked credential $credential_name to asset $asset_name", $client_id, $credential_id); - flashAlert("Asset $asset_name linked with credential $credential_name"); + flashAlert("Asset " . stripslashes($asset_name) . " linked with credential " . stripslashes($credential_name) . ""); redirect(); @@ -940,7 +940,7 @@ if (isset($_GET['unlink_credential_from_asset'])) { logAudit("Credential", "Unlink", "$session_name unlinked asset $asset_name from credential $credential_name", $client_id, $credential_id); - flashAlert("Credential $credential_name unlinked from Asset $asset_name"); + flashAlert("Credential " . stripslashes($credential_name) . " unlinked from asset " . stripslashes($asset_name) . "", 'error'); redirect(); diff --git a/agent/post/client.php b/agent/post/client.php index 2e4261d87..c6f5e8235 100644 --- a/agent/post/client.php +++ b/agent/post/client.php @@ -107,7 +107,7 @@ if (isset($_POST['add_client'])) { logAudit("Client", "Create", "$session_name created client $name$extended_log_description", $client_id, $client_id); - flashAlert("Client $name created"); + flashAlert("Client " . stripslashes($name) . " created"); redirect(); @@ -183,7 +183,7 @@ if (isset($_POST['edit_client'])) { logAudit("Client", "Edit", "$session_name edited client $name", $client_id, $client_id); - flashAlert("Client $name updated"); + flashAlert("Client " . stripslashes($name) . " updated"); redirect(); @@ -215,7 +215,7 @@ if (isset($_GET['archive_client'])) { logAudit("Client", "Archive", "$session_name archived client $client_name", $client_id, $client_id); - flashAlert("Client $client_name archived", 'error'); + flashAlert("Client " . stripslashes($client_name) . " archived", 'error'); redirect(); @@ -238,7 +238,7 @@ if (isset($_GET['restore_client'])) { logAudit("Client", "Restored", "$session_name restored client $client_name", $client_id); - flashAlert("Client $client_name restored"); + flashAlert("Client " . stripslashes($client_name) . " restored"); redirect(); @@ -351,7 +351,7 @@ if (isset($_GET['delete_client'])) { logAudit("Client", "Deleted", "$session_name deleted Client $client_name and all associated data"); - flashAlert("Client $client_name deleted along with all associated data", 'error'); + flashAlert("Client " . stripslashes($client_name) . " deleted, with everything that was theirs", 'error'); redirect('clients.php'); @@ -870,9 +870,9 @@ if (isset($_POST['bulk_edit_client_industry'])) { } - logAudit("Client", "Bulk Edit", "$session_name set the department $industry for $count client(s)", $client_id); + logAudit("Client", "Bulk Edit", "$session_name set the industry $industry for $count client(s)", $client_id); - flashAlert("Set the Industry to $industry for $count clients"); + flashAlert("Industry set to " . stripslashes($industry) . " on $count client" . ($count === 1 ? '' : 's')); } redirect(); @@ -911,7 +911,7 @@ if (isset($_POST['bulk_edit_client_referral'])) { logAudit("Client", "Bulk Edit", "$session_name set the referral $referral for $count client(s)", $client_id); - flashAlert("Set the Referral to $referral for $count clients"); + flashAlert("Referral set to " . stripslashes($referral) . " on $count client" . ($count === 1 ? '' : 's')); } redirect(); diff --git a/agent/post/contact.php b/agent/post/contact.php index 53e1b4d0c..2e6a9a731 100644 --- a/agent/post/contact.php +++ b/agent/post/contact.php @@ -79,7 +79,7 @@ if (isset($_POST['add_contact'])) { triggerCustomAction('contact_create', $contact_id); - flashAlert("Contact $name created"); + flashAlert("Contact " . stripslashes($name) . " created"); redirect(); @@ -242,7 +242,7 @@ if (isset($_POST['edit_contact'])) { triggerCustomAction('contact_update', $contact_id); - flashAlert("Contact $name updated"); + flashAlert("Contact " . stripslashes($name) . " updated"); redirect(); @@ -357,7 +357,7 @@ if (isset($_GET['delete_contact_note'])) { logAudit("Contact", "Edit", "$session_name deleted $contact_note_type note for $contact_name", $client_id, $contact_id); - flashAlert("Note $contact_note_type deleted.", 'error'); + flashAlert("Note $contact_note_type deleted", 'error'); redirect(); @@ -405,7 +405,7 @@ if (isset($_POST['bulk_assign_contact_location'])) { logAudit("Contact", "Bulk Edit", "$session_name assigned $contact_count contacts to location $location_name", $client_id); - flashAlert("$contact_count contacts assigned to location $location_name"); + flashAlert("$contact_count contact" . ($contact_count === 1 ? '' : 's') . " assigned to location " . stripslashes($location_name) . ""); } redirect(); @@ -445,7 +445,7 @@ if (isset($_POST['bulk_edit_contact_phone'])) { logAudit("Contact", "Bulk Edit", "$session_name set the Phone Number $phone for $contact_count contacts", $client_id); - flashAlert("Phone Number set to " . formatPhoneNumber($phone) . " on $contact_count contacts"); + flashAlert("Phone number set to " . formatPhoneNumber($phone) . " on $contact_count contact" . ($contact_count === 1 ? '' : 's')); } redirect(); @@ -485,7 +485,7 @@ if (isset($_POST['bulk_edit_contact_department'])) { logAudit("Contact", "Bulk Edit", "$session_name set the department $department for $contact_count contacts", $client_id); - flashAlert("You set the Department to $department for $contact_count contacts"); + flashAlert("Department set to " . stripslashes($department) . " on $contact_count contact" . ($contact_count === 1 ? '' : 's')); } redirect(); @@ -529,7 +529,7 @@ if (isset($_POST['bulk_edit_contact_role'])) { logAudit("Contact", "Bulk Edit", "$session_name edited the contact role for $contact_count contacts", $client_id); - flashAlert("You updated contact roles for $contact_count contacts"); + flashAlert("Roles updated on $contact_count contact" . ($contact_count === 1 ? '' : 's')); } redirect(); @@ -721,7 +721,7 @@ if (isset($_POST['bulk_delete_contacts'])) { logAudit("Contact", "Bulk Delete", "$session_name deleted $count contacts", $client_id); - flashAlert("You deleted $count contact(s)"); + flashAlert("Deleted $count contact(s)", 'error'); } @@ -829,7 +829,7 @@ if (isset($_GET['anonymize_contact'])) { logAudit("Contact", "Archive", "$session_name archived and anonymized contact", $client_id, $contact_id); - flashAlert("Contact $contact_name anonymized & archived", 'error'); + flashAlert("Contact " . stripslashes($contact_name) . " anonymized and archived", 'error'); redirect(); @@ -861,7 +861,7 @@ if (isset($_GET['archive_contact'])) { logAudit("Contact", "Archive", "$session_name archived contact $contact_name", $client_id, $contact_id); - flashAlert("Contact $contact_name has been archived", 'error'); + flashAlert("Contact " . stripslashes($contact_name) . " archived", 'error'); redirect(); @@ -893,7 +893,7 @@ if (isset($_GET['restore_contact'])) { logAudit("Contact", "Restore", "$session_name restored contact $contact_name", $client_id, $contact_id); - flashAlert("Contact $contact_name Restored"); + flashAlert("Contact " . stripslashes($contact_name) . " restored"); redirect(); @@ -928,7 +928,7 @@ if (isset($_GET['delete_contact'])) { logAudit("Contact", "Delete", "$session_name deleted contact $contact_name", $client_id); - flashAlert("Contact $contact_name has been deleted.", 'error'); + flashAlert("Contact " . stripslashes($contact_name) . " deleted", 'error'); redirect(); @@ -958,7 +958,7 @@ if (isset($_POST['link_contact_to_asset'])) { logAudit("Asset", "Link", "$session_name linked asset $asset_name to contact $contact_name", $client_id, $asset_id); - flashAlert("Contact $contact_name linked with asset $asset_name"); + flashAlert("Contact " . stripslashes($contact_name) . " linked with asset " . stripslashes($asset_name) . ""); redirect(); @@ -988,7 +988,7 @@ if (isset($_GET['unlink_asset_from_contact'])) { logAudit("Asset", "Unlink", "$session_name unlinked contact $contact_name from asset $asset_name", $client_id, $asset_id); - flashAlert("Asset $asset_name unlinked from Contact $contact_name", 'error'); + flashAlert("Asset " . stripslashes($asset_name) . " unlinked from contact " . stripslashes($contact_name) . "", 'error'); redirect(); @@ -1032,7 +1032,7 @@ if (isset($_POST['link_contact_to_credential'])) { logAudit("Credential", "Link", "$session_name linked credential $credential_name to contact $contact_name", $client_id, $credential_id); - flashAlert("Contact $contact_name linked with credential $credential_name"); + flashAlert("Contact " . stripslashes($contact_name) . " linked with credential " . stripslashes($credential_name) . ""); redirect(); @@ -1064,7 +1064,7 @@ if (isset($_GET['unlink_credential_from_contact'])) { logAudit("Credential", "Unlink", "$session_name unlinked contact $contact_name from credential $credential_name", $client_id, $credential_id); - flashAlert("Credential $credential_name unlinked from Contact $contact_name"); + flashAlert("Credential " . stripslashes($credential_name) . " unlinked from contact " . stripslashes($contact_name) . "", 'error'); redirect(); diff --git a/agent/post/tag.php b/agent/post/tag.php index 69a4c5e3a..60c401bec 100644 --- a/agent/post/tag.php +++ b/agent/post/tag.php @@ -18,7 +18,7 @@ if (isset($_POST['add_tag'])) { logAudit("Tag", "Create", "$session_name created tag $name", 0, $tag_id); - flashAlert("Tag $name created"); + flashAlert("Tag " . stripslashes($name) . " created"); redirect(); diff --git a/agent/post/task.php b/agent/post/task.php index 5bb7ac558..4d2d7f67a 100644 --- a/agent/post/task.php +++ b/agent/post/task.php @@ -38,7 +38,7 @@ if (isset($_POST['add_task'])) { logAudit("Task", "Create", "$session_name created task $task_name", $client_id, $task_id); - flashAlert("You created Task " . escapeHtml(stripslashes($task_name)) . ""); + flashAlert("Task " . escapeHtml(stripslashes($task_name)) . " added"); redirect(); @@ -62,7 +62,7 @@ if (isset($_POST['edit_ticket_task'])) { logAudit("Task", "Edit", "$session_name edited task $task_name", $client_id, $task_id); - flashAlert("Task " . escapeHtml(stripslashes($task_name)) . " edited"); + flashAlert("Task " . escapeHtml(stripslashes($task_name)) . " saved"); redirect(); @@ -83,7 +83,7 @@ if (isset($_POST['edit_ticket_template_task'])) { logAudit("Task", "Edit", "$session_name edited task $task_name", 0, $task_template_id); - flashAlert("Task $task_name edited"); + flashAlert("Task " . stripslashes($task_name) . " saved"); redirect(); @@ -130,7 +130,7 @@ if (isset($_GET['complete_task']) || isset($_GET['undo_complete_task'])) { logAudit("Task", "Edit", "$session_name " . ($complete ? "completed task $task_name" : "marked task $task_name as incomplete"), $client_id, $task_id); - flashAlert("Task " . escapeHtml($task['task_name']) . " " . ($complete ? 'Completed' : 'marked as incomplete'), $complete ? 'success' : 'error'); + flashAlert("Task " . escapeHtml($task['task_name']) . " " . ($complete ? 'completed' : 'marked not done'), $complete ? 'success' : 'error'); redirect(); @@ -303,7 +303,7 @@ if (isset($_POST['add_ticket_task_approver'])) { // Logging logAudit("Task", "Edit", "$session_name added task approver for $task_name", $client_id, $task_id); - flashAlert("Added approver"); + flashAlert("Approver added to task " . stripslashes($task_name) . ""); redirect(); } @@ -318,7 +318,7 @@ if (isset($_GET['approve_ticket_task'])) { $approval_row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT approval_created_by, approval_required_user_id, approval_scope, approval_type FROM task_approvals WHERE approval_id = $approval_id AND approval_task_id = $task_id AND approval_scope = 'internal'")); if (!$approval_row) { - flashAlert("Cannot find/approve that task", 'error'); + flashAlert('That approval request no longer exists.', 'error'); redirect(); } @@ -330,12 +330,12 @@ if (isset($_GET['approve_ticket_task'])) { // Validate approver (deny) if ($required_user > 0 && $required_user !== $session_user_id) { - flashAlert("You cannot approve that task", 'error'); + flashAlert('This approval is for another agent.', 'error'); redirect(); exit; } if ($required_user == 0 && $type == 'any' && $created_by == $session_user_id) { - flashAlert("You cannot approve your own task", 'error'); + flashAlert('You asked for this approval - someone else has to give it.', 'error'); redirect(); exit; } @@ -350,7 +350,7 @@ if (isset($_GET['approve_ticket_task'])) { // Logging logAudit("Task", "Edit", "$session_name approved task $task_name (approval $approval_id)", 0, $task_id); - flashAlert("Approved"); + flashAlert("Task " . stripslashes($task_name) . " approved"); redirect(); } @@ -395,7 +395,7 @@ if (isset($_GET['complete_all_tasks']) || isset($_GET['undo_complete_all_tasks'] logAudit("Ticket", "Edit", "$session_name marked all tasks " . ($complete ? 'complete' : 'as incomplete') . " for ticket " . escapeSql(ticketReference($row)), $client_id, $ticket_id); - flashAlert($complete ? "Marked all tasks Complete" : "Marked all tasks Incomplete", $complete ? 'success' : 'error'); + flashAlert($complete ? "All tasks marked complete" : "All tasks marked not done", $complete ? 'success' : 'error'); redirect(); diff --git a/agent/post/ticket.php b/agent/post/ticket.php index d2a0c06c5..747573ed2 100644 --- a/agent/post/ticket.php +++ b/agent/post/ticket.php @@ -621,7 +621,7 @@ if (isset($_POST['bulk_assign_ticket'])) { $assign_to = ticketAgentId($_POST['assign_to'] ?? 0); if (intval($_POST['assign_to'] ?? 0) && !$assign_to) { - flashAlert('Invalid agent!', 'error'); + flashAlert('Pick an active agent.', 'error'); redirect(); } $agent_name = $assign_to ? (string) getFieldById('users', $assign_to, 'user_name') : 'No One'; @@ -1095,7 +1095,7 @@ if (isset($_POST['add_ticket_reply'])) { triggerCustomAction($ticket_reply_type === 'Internal' ? 'ticket_reply_agent_internal' : 'reply_reply_agent_public', $ticket_id); - flashAlert("Ticket " . escapeHtml(ticketReference($row)) . " has been updated with your reply and was $ticket_reply_type"); + flashAlert(($ticket_reply_type === 'Internal' ? 'Internal note added to' : 'Reply added to') . " ticket " . escapeHtml(ticketReference($row)) . ""); } else { // A file uploaded without any accompanying text has no reply to hang off, @@ -1136,7 +1136,7 @@ if (isset($_GET['delete_ticket_attachment'])) { $attachment_id = intval($_GET['delete_ticket_attachment']); $attachment = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT ticket_attachment_name, ticket_attachment_reference_name, ticket_attachment_ticket_id FROM ticket_attachments WHERE ticket_attachment_id = $attachment_id LIMIT 1")); if (!$attachment) { - flashAlert("Attachment not found", 'error'); + flashAlert('That attachment no longer exists.', 'error'); redirect(); } @@ -1246,7 +1246,7 @@ if (isset($_POST['merge_ticket'])) { $parent = ticketMergeTarget($_POST['merge_into_ticket_id'] ?? 0); if (intval($row['ticket_id']) === intval($parent['ticket_id'])) { - flashAlert("Cannot merge into the same ticket.", 'error'); + flashAlert("A ticket can't be merged into itself.", 'error'); redirect(); } if (!empty($row['ticket_closed_at'])) { @@ -1359,7 +1359,7 @@ if (isset($_GET['resolve_ticket'])) { ticketMailResolved($ticket_id); } - flashAlert("Ticket resolved"); + flashAlert("Ticket " . escapeHtml(ticketReference($row)) . " resolved"); redirect(); @@ -1402,7 +1402,7 @@ if (isset($_GET['close_ticket'])) { "Hello $contact_name,

Your ticket regarding \"$subject\" has been closed.

We hope the request/issue was resolved to your satisfaction, please provide your feedback here.
If you need further assistance, please raise a new ticket using the below details. Please do not reply to this email.

Ticket: $reference
Subject: $subject
Portal: https://$base_url/client/ticket.php?id=$ticket_id

--
$company_name - Support
$from_email
$company_phone"); } - flashAlert("Ticket Closed, this cannot not be reopened but you may start another one"); + flashAlert("Ticket " . escapeHtml(ticketReference($row)) . " closed - for more work on it, start a new ticket"); redirect(); @@ -1423,7 +1423,7 @@ if (isset($_GET['reopen_ticket'])) { ticketReopen($row); - flashAlert("Ticket re-opened"); + flashAlert("Ticket " . escapeHtml(ticketReference($row)) . " reopened"); redirect(); diff --git a/agent/software.php b/agent/software.php index 23e3b3f7a..eba1bcce1 100644 --- a/agent/software.php +++ b/agent/software.php @@ -18,7 +18,7 @@ if (isset($_GET['client_id'])) { require_once "includes/inc_all_client.php"; $client_query = "AND software_client_id = $client_id"; $client_url = "client_id=$client_id&"; - // Overide Filter Header Archived + // Override Filter Header Archived if (isset($_GET['archived']) && $_GET['archived'] == 1) { $archived = 1; $archive_query = "software_archived_at IS NOT NULL"; @@ -30,7 +30,7 @@ if (isset($_GET['client_id'])) { require_once "includes/inc_client_overview_all.php"; $client_query = ''; $client_url = ''; - // Overide Filter Header Archived + // Override Filter Header Archived if (isset($_GET['archived']) && $_GET['archived'] == 1) { $archived = 1; $archive_query = "(client_archived_at IS NOT NULL OR software_archived_at IS NOT NULL)"; diff --git a/agent/user/post/profile.php b/agent/user/post/profile.php index 89bb26ffc..7c455068c 100644 --- a/agent/user/post/profile.php +++ b/agent/user/post/profile.php @@ -6,7 +6,7 @@ * Their details, picture and signature; their password and MFA; their * preferences. Changing what signs them in - the email, the password - and * turning MFA off take their current password, so a session left open is not - * enough to take the account over; the old address is told when the email + * enough to take the account over; the old address gets a notice when the email * changes, and they are emailed when the password changes or MFA goes off. */ diff --git a/agent/user/user_details.php b/agent/user/user_details.php index 444d03ab3..1191f96fe 100644 --- a/agent/user/user_details.php +++ b/agent/user/user_details.php @@ -3,7 +3,7 @@ /* * Your account > Profile - your picture, name, email and the signature that * goes on your ticket replies. Your email signs you in, so changing it takes - * your current password, and the old address is told. + * your current password, and the old address gets a notice. */ require_once "includes/inc_all_user.php"; @@ -63,7 +63,7 @@ $has_avatar = trim((string) $me['user_avatar']) !== '';
-
You'll sign in with the new email from now on - your old address is told it changed.
+
You'll sign in with the new email from now on - your old address gets a notice that it changed.
diff --git a/agent/vendor.php b/agent/vendor.php index aa208832a..cd80ea74c 100644 --- a/agent/vendor.php +++ b/agent/vendor.php @@ -303,7 +303,7 @@ if (!$vendor || (isset($_GET['client_id']) && $vendor_client_id !== intval($clie + data-confirm-text=" goes for good. Its cases, licenses, assets and domains stay, with no vendor."> Delete diff --git a/agent/vendors.php b/agent/vendors.php index 22018ac3f..2e321c976 100644 --- a/agent/vendors.php +++ b/agent/vendors.php @@ -36,7 +36,7 @@ if (isset($_GET['client_id'])) { $client_url = ''; } -// Overide Filter Header Archived +// Override Filter Header Archived $archived = isset($_GET['archived']) && $_GET['archived'] == 1 ? 1 : 0; if ($view === 'clients') { $archive_query = $archived ? "(client_archived_at IS NOT NULL OR vendor_archived_at IS NOT NULL)" : "(client_archived_at IS NULL AND vendor_archived_at IS NULL)"; @@ -238,7 +238,7 @@ $add_url = "modals/vendor/vendor_add.php?" . ($view === 'client' ? "client_id=$c @@ -423,7 +423,7 @@ $add_url = "modals/vendor/vendor_add.php?" . ($view === 'client' ? "client_id=$c + data-confirm-text=" goes for good. Its cases, licenses, assets and domains stay, with no vendor."> Delete diff --git a/css/itflow_custom.css b/css/itflow_custom.css index f654722f0..d7190d444 100644 --- a/css/itflow_custom.css +++ b/css/itflow_custom.css @@ -1,3 +1,11 @@ +/* The hidden attribute always hides. Bootstrap's display utilities (.d-flex, + .d-block...) are !important too and load later, so an element carrying both + was shown - a strength meter on an empty password, a note meant for one + role. This sheet loads after Bootstrap, so here [hidden] wins. */ +[hidden] { + display: none !important; +} + /* For screens below 576px (xs): - Make the button full-width, display:block @@ -5428,3 +5436,10 @@ img.itflow-contact-avatar { .itflow-theme-swatch.is-dark { background: linear-gradient(90deg, #343a40 0 30%, #212529 30%); } + +/* Pagination (includes/filter_footer.php) - on a phone a long run of page + numbers wraps instead of pushing the page wider than the screen */ +.pagination { + flex-wrap: wrap; + row-gap: .25rem; +} diff --git a/functions/credential.php b/functions/credential.php index c009fb69e..cb223f439 100644 --- a/functions/credential.php +++ b/functions/credential.php @@ -279,19 +279,6 @@ function selectOptionCredential($row, $description = '') { return selectOptionData(['icon' => 'fas ' . credentialKind($row)['icon'], 'description' => $description, 'keywords' => $row['credential_uri'] ?? '']); } -/** - * A credential wherever a page mentions one: its tile and its name, opening - * its quick look. 'class' goes on the link; 'archived' strikes it through. - */ -function credentialLink($row, $options = []) { - $credential_id = intval($row['credential_id'] ?? $row['id'] ?? 0); - $name = escapeHtml($row['credential_name'] ?? $row['name'] ?? ''); - $archived = !empty($options['archived']); - $class = trim('text-truncate ' . ($options['class'] ?? '') . ($archived ? ' text-decoration-line-through text-body-secondary' : '')); - return '' . credentialTile($row, 'sm') - . "$name"; -} - /** * Credentials to list somewhere - an asset's, a contact's, a vendor's or a * license's - each with its client, contact and asset like credentialRow(), diff --git a/functions/links.php b/functions/links.php index b47a1cfbb..f5abef3cf 100644 --- a/functions/links.php +++ b/functions/links.php @@ -190,15 +190,6 @@ function linkCandidates($from, $id, $to, $client_id) { return $rows; } -/** How many $to records each type has linked to this $from record - for tab and section counts. */ -function linkCounts($from, $id) { - $counts = []; - foreach (linkTypesFor($from) as $to) { - $counts[$to] = count(linkedRecords($from, $id, $to)); - } - return $counts; -} - /** The audit log entry a link change is filed under - the service, document, file or license side of it. */ function linkLogSide($from, $id, $to, $other_id) { foreach (['service', 'document', 'file', 'software'] as $side) { diff --git a/functions/project.php b/functions/project.php index e14887639..b84277de9 100644 --- a/functions/project.php +++ b/functions/project.php @@ -122,16 +122,6 @@ function projectUrl($project_id, $client_id = 0) { return 'project.php?' . ($client_id ? "client_id=$client_id&" : '') . 'project_id=' . intval($project_id); } -/** A project wherever a page mentions one: its name opening it, its reference beside it. */ -function projectLink($row, $options = []) { - $url = escapeHtml(projectUrl($row['project_id'], $row['project_client_id'] ?? 0)); - $html = '' . escapeHtml($row['project_name']) . ''; - if ($options['reference'] ?? true) { - $html .= ' ' . escapeHtml(projectReference($row)) . ''; - } - return $html; -} - /** Where it stands: archived, completed, upcoming (starts after today) or active. */ function projectState($row) { if (!empty($row['project_archived_at'])) {