diff --git a/assets/js/dashboard.js b/assets/js/dashboard.js
index f3fe0fc..7f8b96f 100644
--- a/assets/js/dashboard.js
+++ b/assets/js/dashboard.js
@@ -130,7 +130,7 @@ document.addEventListener('DOMContentLoaded', function() {
if (typeof showBulkPriorityModal === 'function') showBulkPriorityModal();
break;
case 'bulk-delete':
- if (typeof bulkDelete === 'function') bulkDelete();
+ showBulkDeleteModal();
break;
case 'clear-selection':
clearSelection();
@@ -760,10 +760,7 @@ function showBulkStatusModal() {
@@ -296,21 +297,39 @@ include __DIR__ . '/layout_header.php';
}
// ── Visibility groups toggle ──────────────────────────────
+ var visibilityHints = {
+ 'public': 'Everyone who is logged in can view this ticket.',
+ 'internal': 'Only members of the selected groups (plus admins) can view this ticket.',
+ 'confidential': 'Only you, the assignee, and admins can view this ticket.'
+ };
function toggleVisibilityGroups() {
var vis = document.getElementById('visibility').value;
var container = document.getElementById('visibilityGroupsContainer');
+ var hint = document.getElementById('visibilityHint');
if (vis === 'internal') {
container.classList.remove('is-hidden');
} else {
container.classList.add('is-hidden');
container.querySelectorAll('.visibility-group-checkbox').forEach(function (cb) { cb.checked = false; });
}
+ if (hint) hint.textContent = visibilityHints[vis] || '';
}
// ── Template loader ───────────────────────────────────────
function loadTemplate() {
var tplId = document.getElementById('templateSelect').value;
if (!tplId) return;
+
+ // Warn before overwriting content the user has already typed
+ var existingTitle = (document.getElementById('title').value || '').trim();
+ var existingDesc = (document.getElementById('description').value || '').trim();
+ if (existingTitle || existingDesc) {
+ if (!confirm('Applying this template will overwrite your current title and description. Continue?')) {
+ document.getElementById('templateSelect').value = '';
+ return;
+ }
+ }
+
lt.api.get('/api/get_template.php?template_id=' + encodeURIComponent(tplId))
.then(function (data) {
if (!data.success || !data.template) {
diff --git a/views/DashboardView.php b/views/DashboardView.php
index a4e423d..fcb2044 100644
--- a/views/DashboardView.php
+++ b/views/DashboardView.php
@@ -51,6 +51,7 @@ if (!empty($_GET['assigned_to'])) {
$activeFilters[] = ['type' => 'assigned_to', 'value' => $_GET['assigned_to'], 'label' => 'Assigned: ' . $label];
}
+$_lt_statuses = $GLOBALS['config']['TICKET_STATUSES'];
$currentStatus = isset($_GET['status']) ? explode(',', $_GET['status']) : ['Open', 'Pending', 'In Progress'];
$currentCategories = isset($_GET['category']) ? explode(',', $_GET['category']) : [];
$currentTypes = isset($_GET['type']) ? explode(',', $_GET['type']) : [];
@@ -181,7 +182,7 @@ include __DIR__ . '/layout_header.php';