diff --git a/agent/clients.php b/agent/clients.php index 61d6749e2..7bc51edb6 100644 --- a/agent/clients.php +++ b/agent/clients.php @@ -446,9 +446,9 @@ $total_leads = intval($row['leads']);
| + |
| ||
|---|---|---|---|
| + |
|
- + + |
- = $client_name ?>
-
-
diff --git a/agent/post/client.php b/agent/post/client.php
index c6f3fbbfd..ba1a016d1 100644
--- a/agent/post/client.php
+++ b/agent/post/client.php
@@ -1044,9 +1044,13 @@ if (isset($_POST['bulk_assign_client_tags'])) {
}
- logAudit("Client", "Bulk Edit", "$session_name added tags for $count clients", $client_id);
+ if ($count === 1) {
+ flashAlert("Tags added to " . escapeHtml($row['client_name']) . "");
+ } else {
+ logAudit("Client", "Bulk Edit", "$session_name added tags for $count clients", $client_id);
- flashAlert("Assigned tags for $count clients");
+ flashAlert("Assigned tags for $count clients");
+ }
}
redirect();
diff --git a/css/itflow_custom.css b/css/itflow_custom.css
index dcb4dbfe0..04dcc6f27 100644
--- a/css/itflow_custom.css
+++ b/css/itflow_custom.css
@@ -2370,6 +2370,23 @@ a.itflow-dash-rail-item:focus-visible {
color: #fff;
filter: brightness(1.1);
}
+/* The whole client cell is a link (stretched-link); the pills stay clickable on top of it */
+.itflow-clients-client .itflow-client-tag {
+ position: relative;
+ z-index: 2;
+}
+/* "+ Tag" / "+" at the end of the tags - opens Add Tags for that client */
+.itflow-client-tag-add {
+ color: var(--bs-secondary-color);
+ background-color: transparent;
+ border: 1px dashed var(--bs-border-color);
+}
+.itflow-client-tag-add:hover,
+.itflow-client-tag-add:focus-visible {
+ color: var(--itflow-accent, var(--bs-primary));
+ border-color: currentColor;
+ filter: none;
+}
.itflow-clients-street {
max-width: 16rem;
}
-
- = $client_type ?>
-
+ = $client_name ?>
+
+
diff --git a/agent/modals/client/client_bulk_assign_tags.php b/agent/modals/client/client_bulk_assign_tags.php
index 5083c6d18..d9191de55 100644
--- a/agent/modals/client/client_bulk_assign_tags.php
+++ b/agent/modals/client/client_bulk_assign_tags.php
@@ -2,16 +2,32 @@
require_once '../../../includes/modal_header.php';
+enforceUserPermission('module_client', 2);
+
$client_ids = array_map('intval', $_GET['client_ids'] ?? []);
$count = count($client_ids);
+// Opened from the + beside one client's tags on the clients list: name the
+// client, and offer only the tags it doesn't already have
+$single_client_id = $count === 1 ? $client_ids[0] : 0;
+$existing_tags_query = '';
+if ($single_client_id) {
+ enforceClientAccess($single_client_id);
+ $single_client_name = escapeHtml(getFieldById('clients', $single_client_id, 'client_name'));
+ $existing_tags_query = "AND tag_id NOT IN (SELECT tag_id FROM client_tags WHERE client_id = $single_client_id)";
+}
+
ob_start();
?>
= $client_type ?>
+
+
+
" aria-hidden="true">= $tag_name ?>
+
+
+ TagAdd tags
+
+
-
@@ -22,10 +38,12 @@ ob_start();
Assign Tags for = $count ?> Clients+ +Add Tags to = $single_client_name ?>+ +Assign Tags for = $count ?> Clients+
-
-
-
-
+
+
+
+
+
+
@@ -34,7 +52,7 @@ ob_start();
+
+ This client already has every client tag.
+
|