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

This commit is contained in:
johnnyq
2026-10-15 22:20:25 -04:00
parent 99ecc2d4a4
commit df0c6a5bc8
79 changed files with 556 additions and 379 deletions

View File

@@ -15,7 +15,10 @@ ob_start();
<div class="modal-body">
<div class="mb-3">
<label class="form-label">Name <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="name" placeholder="Client onboarding, server refresh, office move..." maxlength="200" required autofocus>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-cubes"></i></span>
<input type="text" class="form-control" name="name" placeholder="Client onboarding, server refresh, office move..." maxlength="200" required autofocus>
</div>
</div>
<div class="mb-0">

View File

@@ -25,7 +25,10 @@ ob_start();
<div class="modal-body">
<div class="mb-3">
<label class="form-label">Name <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="name" maxlength="200" value="<?= escapeHtml($row['project_template_name']) ?>" required autofocus>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-cubes"></i></span>
<input type="text" class="form-control" name="name" maxlength="200" value="<?= escapeHtml($row['project_template_name']) ?>" required autofocus>
</div>
</div>
<div class="mb-0">

View File

@@ -87,7 +87,7 @@ $value = function ($key) use ($form) {
<input type="email" class="form-control" name="email" placeholder="They sign in with this" maxlength="200" value="<?= $value('user_email') ?>" required>
</div>
<?php if (!$is_new) { ?>
<div class="form-text">Changed, they sign in with the new one - the old address is told.</div>
<div class="form-text">If you change it, they sign in with the new address - the old one gets a notice.</div>
<?php } ?>
</div>
<div class="col-12">
@@ -153,7 +153,7 @@ $value = function ($key) use ($form) {
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" name="force_mfa" value="1" id="<?= $form_id ?>ForceMfa" <?= intval($form['user_config_force_mfa'] ?? 0) ? 'checked' : '' ?>>
<label class="form-check-label" for="<?= $form_id ?>ForceMfa">Require it</label>
<div class="form-text mt-0">Without it set up, they set it up at their next sign in - and they cannot turn it off.</div>
<div class="form-text mt-0">If they haven't set it up yet, they're asked to at their next sign in - and they can't turn it off.</div>
</div>
<?php if ($form_has_mfa) { ?>
<div class="form-check mt-2">

View File

@@ -4520,7 +4520,7 @@ function demoDataSpecs() {
'recurring_ticket' => 'Monthly maintenance visit - Verity Insurance',
'project' => null,
'vendors' => [
['Allegheny Business Fiber', 'Office internet and failover', '412-555-0158', 'alleghenyfiber.example', '4 hour response', 'Primary fibre with a 4G backup that has never been tested under load.'],
['Allegheny Business Fiber', 'Office internet and failover', '412-555-0158', 'alleghenyfiber.example', '4 hour response', 'Primary fiber with a 4G backup that has never been tested under load.'],
['Carrier Gateway Systems', 'Insurance carrier portal aggregator', '412-555-0159', 'carriergateway.example', '8x5 support', 'Browser fussy. Keep one machine on the known good version.'],
],
'fleet' => ['Firewall/Router' => 1, 'Switch' => 2, 'Access Point' => 3, 'Server' => 2, 'Desktop' => 15, 'Laptop' => 5, 'Printer' => 3, 'Phone' => 14],

View File

@@ -18,7 +18,7 @@ if (isset($_POST['add_tag'])) {
logAudit("Tag", "Create", "$session_name created tag $name", 0, $tag_id);
flashAlert("Tag <strong>$name</strong> created");
flashAlert("Tag <strong>" . stripslashes($name) . "</strong> created");
redirect();
@@ -36,7 +36,7 @@ if (isset($_POST['edit_tag'])) {
logAudit("Tag", "Edit", "$session_name edited tag $name", 0, $tag_id);
flashAlert("Tag <strong>$name</strong> edited");
flashAlert("Tag <strong>" . stripslashes($name) . "</strong> saved");
redirect();
@@ -54,7 +54,7 @@ if (isset($_GET['delete_tag'])) {
logAudit("Tag", "Delete", "$session_name deleted tag $tag_name");
flashAlert("Tag <strong>$tag_name</strong> deleted", 'error');
flashAlert("Tag <strong>" . stripslashes($tag_name) . "</strong> deleted", 'error');
redirect();

View File

@@ -30,7 +30,7 @@ if (isset($_POST['add_ticket_template'])) {
logAudit("Ticket Template", "Create", "$session_name created ticket template $name", 0, $ticket_template_id);
flashAlert("Ticket Template <strong>$name</strong> created");
flashAlert("Ticket template <strong>" . stripslashes($name) . "</strong> created");
redirect();
@@ -50,7 +50,7 @@ if (isset($_POST['edit_ticket_template'])) {
logAudit("Ticket Template", "Edit", "$session_name edited ticket template $name", 0, $ticket_template_id);
flashAlert("Ticket Template <strong>$name</strong> edited");
flashAlert("Ticket template <strong>" . stripslashes($name) . "</strong> saved");
redirect();
@@ -76,7 +76,7 @@ if (isset($_GET['delete_ticket_template'])) {
logAudit("Ticket Template", "Delete", "$session_name deleted ticket template $ticket_template_name");
flashAlert("Ticket Template <strong>$ticket_template_name</strong> and its associated tasks deleted", 'error');
flashAlert("Ticket template <strong>" . stripslashes($ticket_template_name) . "</strong> and its tasks deleted", 'error');
redirect();
@@ -95,7 +95,7 @@ if (isset($_POST['add_ticket_template_task'])) {
logAudit("Ticket Template", "Create", "$session_name created task $task_name for ticket template", 0, $ticket_template_id);
flashAlert("Added Task <strong>$task_name</strong>");
flashAlert("Task <strong>" . stripslashes($task_name) . "</strong> added");
redirect();
@@ -113,7 +113,7 @@ if (isset($_GET['delete_task_template'])) {
logAudit("Ticket Template", "Edit", "$session_name deleted task $task_template_name from ticket template");
flashAlert("Task <strong>$task_template_name</strong> deleted", 'error');
flashAlert("Task <strong>" . stripslashes($task_template_name) . "</strong> deleted", 'error');
redirect();

View File

@@ -31,7 +31,7 @@ if (isset($_POST['add_vendor_template'])) {
logAudit("Vendor Template", "Create", "$session_name created vendor template $name", 0, $vendor_template_id);
flashAlert("Vendor template <strong>$name</strong> created");
flashAlert("Vendor template <strong>" . stripslashes($name) . "</strong> created");
redirect();
@@ -140,7 +140,7 @@ if (isset($_POST['edit_vendor_template'])) {
logAudit("Vendor Template", "Edit", "$session_name edited vendor template $name", 0, $vendor_template_id);
flashAlert("Vendor template <strong>$name</strong> edited");
flashAlert("Vendor template <strong>" . stripslashes($name) . "</strong> saved");
redirect();
@@ -161,7 +161,7 @@ if (isset($_GET['delete_vendor_template'])) {
logAudit("Vendor Template", "Delete", "$session_name deleted vendor template $vendor_template_name");
flashAlert("Vendor Template <strong>$vendor_template_name</strong> deleted", 'error');
flashAlert("Vendor template <strong>" . stripslashes($vendor_template_name) . "</strong> deleted", 'error');
redirect();

View File

@@ -33,7 +33,7 @@ $theme_colors_array = array(
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<p class="text-muted">Sets the colour of the top bar, links, buttons and highlights.</p>
<p class="text-muted">Sets the color of the top bar, links, buttons and highlights.</p>
<div class="row row-cols-3 row-cols-sm-4 row-cols-lg-6 g-3">

View File

@@ -17,7 +17,7 @@ if (isset($_GET['client_id'])) {
require_once "includes/inc_all_client.php";
$client_query = "AND asset_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 = "asset_archived_at IS NOT NULL";
@@ -29,7 +29,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 asset_archived_at IS NOT NULL)";

View File

@@ -19,7 +19,7 @@ if (isset($_GET['client_id'])) {
require_once "includes/inc_all_client.php";
$client_query = "AND contact_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 = "contact_archived_at IS NOT NULL";
@@ -31,7 +31,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 contact_archived_at IS NOT NULL)";

View File

@@ -260,7 +260,7 @@ if (!$location || ($client_url && intval($location['location_client_id']) !== in
</a>
<?php if ($can_delete) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_location=<?= $location_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"
data-confirm-text="<?= $location_name ?> goes for good. Its people, assets, networks, racks and tickets stay, at no location.">
data-confirm-text="<?= $location_name ?> goes for good. Its people, assets, networks, racks and tickets stay, with no location.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</a>
<?php } ?>

View File

@@ -17,7 +17,7 @@ if (isset($_GET['client_id'])) {
require_once "includes/inc_all_client.php";
$client_query = "AND location_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 = "location_archived_at IS NOT NULL";
@@ -29,7 +29,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 location_archived_at IS NOT NULL)";
@@ -208,7 +208,7 @@ $locations_counts = locationCounts(array_keys($locations));
</button>
<?php if ($can_delete) { ?>
<button class="dropdown-item text-danger text-bold confirm-link" type="submit" form="bulkActions" name="bulk_delete_locations"
data-confirm-text="The locations go for good. Their people, assets, networks, racks and tickets stay, at no location.">
data-confirm-text="The locations go for good. Their people, assets, networks, racks and tickets stay, with no location.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</button>
<?php } ?>
@@ -390,7 +390,7 @@ $locations_counts = locationCounts(array_keys($locations));
</a>
<?php if ($can_delete) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_location=<?= $location_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"
data-confirm-text="<?= $location_name ?> goes for good. Its people, assets, networks, racks and tickets stay, at no location.">
data-confirm-text="<?= $location_name ?> goes for good. Its people, assets, networks, racks and tickets stay, with no location.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</a>
<?php } ?>

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring me-2"></i>Create Tickets for <strong><?= $count ?></strong> Assets</h5>
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring me-2"></i>Create Tickets for <strong><?= $count ?></strong> asset<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -16,7 +16,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-user-check me-2"></i>Assign Contact to <strong><?= $count ?></strong> Assets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-user-check me-2"></i>Assign Contact to <strong><?= $count ?></strong> asset<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -16,7 +16,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt me-2"></i>Assign Location to <strong><?= $count ?></strong> Assets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt me-2"></i>Assign Location to <strong><?= $count ?></strong> asset<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt me-2"></i>Set Physical Location for <strong><?= $count ?></strong> Assets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt me-2"></i>Set Physical Location for <strong><?= $count ?></strong> asset<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-info me-2"></i>Set Status for <strong><?= $count ?></strong> Assets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-info me-2"></i>Set Status for <strong><?= $count ?></strong> asset<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -17,7 +17,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-exchange-alt me-2"></i>Transfer <strong><?= $count ?></strong> Asset(s) to Client</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-exchange-alt me-2"></i>Transfer <strong><?= $count ?></strong> asset<?= $count === 1 ? '' : 's' ?> to Client</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -30,7 +30,7 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<input type="text" class="form-control" name="bulk_vlans" maxlength="200" placeholder="20, or Trunk 1, 10-20" autofocus>
</div>
<div class="form-text">Left empty, their VLANs are cleared.</div>
<div class="form-text">Leave it empty to clear their VLANs.</div>
</div>
<div class="modal-footer">

View File

@@ -181,7 +181,7 @@ $form_type = (string) ($form['interface_type'] ?? '');
</div>
<div class="tab-pane fade" id="<?= $form_id ?>Notes">
<textarea class="form-control" name="notes" rows="8" placeholder="Patch panel port, cable colour, what is on the other end"><?= escapeHtml($form['interface_notes'] ?? '') ?></textarea>
<textarea class="form-control" name="notes" rows="8" placeholder="Patch panel port, cable color, what is on the other end"><?= escapeHtml($form['interface_notes'] ?? '') ?></textarea>
</div>
</div>

View File

@@ -29,10 +29,13 @@ ob_start();
<div class="modal-body">
<div class="mb-3">
<label class="form-label">Name <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="name" placeholder="Onsite visits, Maintenance windows, Time off..." maxlength="200" required autofocus>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar"></i></span>
<input type="text" class="form-control" name="name" placeholder="Onsite visits, Maintenance windows, Time off..." maxlength="200" required autofocus>
</div>
</div>
<div class="mb-0">
<label class="form-label">Colour</label>
<label class="form-label">Color</label>
<input type="color" class="form-control form-control-color" name="color" value="<?= $suggested ?>">
</div>
</div>

View File

@@ -36,10 +36,13 @@ ob_start();
<div class="modal-body">
<div class="mb-3">
<label class="form-label">Name <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="name" maxlength="200" value="<?= escapeHtml($calendar['calendar_name']) ?>" required>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar"></i></span>
<input type="text" class="form-control" name="name" maxlength="200" value="<?= escapeHtml($calendar['calendar_name']) ?>" required>
</div>
</div>
<div class="mb-0">
<label class="form-label">Colour</label>
<label class="form-label">Color</label>
<input type="color" class="form-control form-control-color" name="color" value="<?= escapeHtml($color) ?>">
</div>
</div>

View File

@@ -29,15 +29,21 @@ $form_can_email = calendarCanEmail();
<div class="row g-3 mb-3">
<div class="col-md-8">
<label class="form-label">Title <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="title" maxlength="200" value="<?= escapeHtml($form['event_title'] ?? '') ?>" placeholder="Onsite visit, Maintenance window, Quarterly review..." required autofocus>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
<input type="text" class="form-control" name="title" maxlength="200" value="<?= escapeHtml($form['event_title'] ?? '') ?>" placeholder="Onsite visit, Maintenance window, Quarterly review..." required autofocus>
</div>
</div>
<div class="col-md-4">
<label class="form-label">Calendar <strong class="text-danger">*</strong></label>
<select class="form-select select2" name="calendar" required>
<?php foreach ($form_calendars as $calendar_id => $calendar) { ?>
<option value="<?= $calendar_id ?>"<?= selectOptionColor(calendarColor($calendar['calendar_color'])) ?> <?= $calendar_id === $form_calendar_id ? 'selected' : '' ?>><?= escapeHtml($calendar['calendar_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar"></i></span>
<select class="form-select select2" name="calendar" required>
<?php foreach ($form_calendars as $calendar_id => $calendar) { ?>
<option value="<?= $calendar_id ?>"<?= selectOptionColor(calendarColor($calendar['calendar_color'])) ?> <?= $calendar_id === $form_calendar_id ? 'selected' : '' ?>><?= escapeHtml($calendar['calendar_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
@@ -52,41 +58,60 @@ $form_can_email = calendarCanEmail();
<div class="row g-2">
<div class="col-6 col-md-3">
<label class="form-label small text-body-secondary mb-1" for="event_form_start_date">Starts</label>
<input type="date" class="form-control event-start-date" id="event_form_start_date" name="start_date" value="<?= date('Y-m-d', $form_start_ts) ?>" required>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar-day"></i></span>
<input type="date" class="form-control event-start-date" id="event_form_start_date" name="start_date" value="<?= date('Y-m-d', $form_start_ts) ?>" required>
</div>
</div>
<div class="col-6 col-md-3<?= $form_all_day ? ' d-none' : '' ?> event_form_time_fields">
<label class="form-label small text-body-secondary mb-1" for="event_form_start_time">at</label>
<input type="time" class="form-control event-start-time" id="event_form_start_time" name="start_time" value="<?= date('H:i', $form_start_ts) ?>"<?= $form_all_day ? '' : ' required' ?>>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-clock"></i></span>
<input type="time" class="form-control event-start-time" id="event_form_start_time" name="start_time" value="<?= date('H:i', $form_start_ts) ?>"<?= $form_all_day ? '' : ' required' ?>>
</div>
</div>
<div class="col-6 col-md-3">
<label class="form-label small text-body-secondary mb-1" for="event_form_end_date">Ends</label>
<input type="date" class="form-control" id="event_form_end_date" name="end_date" value="<?= date('Y-m-d', $form_end_ts) ?>" required>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar-day"></i></span>
<input type="date" class="form-control" id="event_form_end_date" name="end_date" value="<?= date('Y-m-d', $form_end_ts) ?>" required>
</div>
</div>
<div class="col-6 col-md-3<?= $form_all_day ? ' d-none' : '' ?> event_form_time_fields">
<label class="form-label small text-body-secondary mb-1" for="event_form_end_time">at</label>
<input type="time" class="form-control" id="event_form_end_time" name="end_time" value="<?= date('H:i', $form_end_ts) ?>"<?= $form_all_day ? '' : ' required' ?>>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-clock"></i></span>
<input type="time" class="form-control" id="event_form_end_time" name="end_time" value="<?= date('H:i', $form_end_ts) ?>"<?= $form_all_day ? '' : ' required' ?>>
</div>
</div>
</div>
<div class="row g-2 align-items-end mt-1">
<div class="col-md-4">
<label class="form-label small text-body-secondary mb-1" for="eventRepeat">Repeats</label>
<select class="form-select" name="repeat" id="eventRepeat">
<option value="" <?= $form_repeat === '' ? 'selected' : '' ?>>Does not repeat</option>
<?php foreach (['Day' => 'Daily', 'Week' => 'Weekly', 'Month' => 'Monthly', 'Year' => 'Yearly'] as $value => $label) { ?>
<option value="<?= $value ?>" data-one="<?= CALENDAR_REPEATS[$value][1] ?>" data-many="<?= CALENDAR_REPEATS[$value][2] ?>" <?= $form_repeat === $value ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-redo"></i></span>
<select class="form-select" name="repeat" id="eventRepeat">
<option value="" <?= $form_repeat === '' ? 'selected' : '' ?>>Does not repeat</option>
<?php foreach (['Day' => 'Daily', 'Week' => 'Weekly', 'Month' => 'Monthly', 'Year' => 'Yearly'] as $value => $label) { ?>
<option value="<?= $value ?>" data-one="<?= CALENDAR_REPEATS[$value][1] ?>" data-many="<?= CALENDAR_REPEATS[$value][2] ?>" <?= $form_repeat === $value ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-6 col-md-4" id="eventRepeatEvery" <?= $form_repeat ? '' : 'hidden' ?>>
<label class="form-label small text-body-secondary mb-1" for="eventRepeatInterval">Every</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-sync-alt"></i></span>
<input type="number" class="form-control" name="repeat_interval" id="eventRepeatInterval" min="1" max="99" value="<?= $form_interval ?>">
<span class="input-group-text" id="eventRepeatUnit"><?= $form_repeat ? CALENDAR_REPEATS[$form_repeat][$form_interval === 1 ? 1 : 2] : 'weeks' ?></span>
</div>
</div>
<div class="col-6 col-md-4" id="eventRepeatUntilField" <?= $form_repeat ? '' : 'hidden' ?>>
<label class="form-label small text-body-secondary mb-1" for="eventRepeatUntil">Until <span class="fw-normal">(optional)</span></label>
<input type="date" class="form-control" name="repeat_until" id="eventRepeatUntil" value="<?= escapeHtml($form['event_repeat_until'] ?? '') ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-hourglass-end"></i></span>
<input type="date" class="form-control" name="repeat_until" id="eventRepeatUntil" value="<?= escapeHtml($form['event_repeat_until'] ?? '') ?>">
</div>
</div>
</div>
<?php if (calendarSkippedDates($form)) { ?>
@@ -102,32 +127,41 @@ $form_can_email = calendarCanEmail();
<?php } else { ?>
<div class="col-md-6">
<label class="form-label">Client</label>
<select class="form-select select2" name="client_id" id="eventClientSelect">
<option value="0">- Internal, no client -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE (client_archived_at IS NULL OR client_id = $form_client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>"<?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?> <?= intval($row['client_id']) === $form_client_id ? 'selected' : '' ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" id="eventClientSelect">
<option value="0">- Internal, no client -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE (client_archived_at IS NULL OR client_id = $form_client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>"<?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?> <?= intval($row['client_id']) === $form_client_id ? 'selected' : '' ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<?php } ?>
<div class="<?= $form_locked_client ? 'col-md-6' : 'col-md-6' ?>" id="eventSiteField" <?= $form_client_id ? '' : 'hidden' ?>>
<label class="form-label">Site</label>
<select class="form-select select2" name="location_id" id="eventSiteSelect" data-selected="<?= intval($form['event_location_id'] ?? 0) ?>">
<option value="0">- No site -</option>
<?php
if ($form_client_id) {
$sql = mysqli_query($mysqli, "SELECT location_id, location_name, location_address, location_city FROM locations WHERE location_client_id = $form_client_id AND (location_archived_at IS NULL OR location_id = " . intval($form['event_location_id'] ?? 0) . ") ORDER BY location_primary DESC, location_name");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['location_id']) ?>" data-icon="fas fa-map-marker-alt" data-description="<?= escapeHtml(implode(', ', array_filter([$row['location_address'], $row['location_city']]))) ?>" <?= intval($row['location_id']) === intval($form['event_location_id'] ?? 0) ? 'selected' : '' ?>><?= escapeHtml($row['location_name']) ?></option>
<?php }
} ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-building"></i></span>
<select class="form-select select2" name="location_id" id="eventSiteSelect" data-selected="<?= intval($form['event_location_id'] ?? 0) ?>">
<option value="0">- No site -</option>
<?php
if ($form_client_id) {
$sql = mysqli_query($mysqli, "SELECT location_id, location_name, location_address, location_city FROM locations WHERE location_client_id = $form_client_id AND (location_archived_at IS NULL OR location_id = " . intval($form['event_location_id'] ?? 0) . ") ORDER BY location_primary DESC, location_name");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['location_id']) ?>" data-icon="fas fa-map-marker-alt" data-description="<?= escapeHtml(implode(', ', array_filter([$row['location_address'], $row['location_city']]))) ?>" <?= intval($row['location_id']) === intval($form['event_location_id'] ?? 0) ? 'selected' : '' ?>><?= escapeHtml($row['location_name']) ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-12">
<label class="form-label">Location <span class="text-body-secondary small fw-normal">- a room, an address, or a Teams / Zoom link</span></label>
<input type="text" class="form-control" name="location" maxlength="500" value="<?= escapeHtml($form['event_location'] ?? '') ?>" placeholder="Server room, 2nd floor - or https://teams.microsoft.com/...">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-map-marker-alt"></i></span>
<input type="text" class="form-control" name="location" maxlength="500" value="<?= escapeHtml($form['event_location'] ?? '') ?>" placeholder="Server room, 2nd floor - or https://teams.microsoft.com/...">
</div>
</div>
</div>
@@ -135,29 +169,38 @@ $form_can_email = calendarCanEmail();
<label class="form-label d-block">Who <span class="text-body-secondary small fw-normal">- agents, the client's contacts, and anyone else by email</span></label>
<div class="row g-2">
<div class="col-md-6">
<select class="form-select select2" name="agents[]" multiple data-placeholder="Agents">
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1 AND user_archived_at IS NULL AND (user_status = 1 OR user_id IN (0" . implode('', array_map(function ($id) {
return ',' . intval($id);
}, $form_attendees['agents'])) . ")) ORDER BY user_name");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['user_id']) ?>"<?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar']) ?> <?= in_array(intval($row['user_id']), $form_attendees['agents'], true) ? 'selected' : '' ?>><?= escapeHtml($row['user_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="agents[]" multiple data-placeholder="Agents">
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1 AND user_archived_at IS NULL AND (user_status = 1 OR user_id IN (0" . implode('', array_map(function ($id) {
return ',' . intval($id);
}, $form_attendees['agents'])) . ")) ORDER BY user_name");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['user_id']) ?>"<?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar']) ?> <?= in_array(intval($row['user_id']), $form_attendees['agents'], true) ? 'selected' : '' ?>><?= escapeHtml($row['user_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-6" id="eventContactsField" <?= $form_client_id ? '' : 'hidden' ?>>
<select class="form-select select2" name="contacts[]" id="eventContactsSelect" multiple data-placeholder="Contacts">
<?php
if ($form_client_id) {
$sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_title, contact_email, contact_photo FROM contacts WHERE contact_client_id = $form_client_id AND contact_archived_at IS NULL ORDER BY contact_primary DESC, contact_technical DESC, contact_name");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['contact_id']) ?>"<?= selectOptionContact($form_client_id, $row['contact_name'], $row['contact_photo'], $row['contact_email'] ?: 'No email', $row['contact_id']) ?> <?= in_array(intval($row['contact_id']), $form_attendees['contacts'], true) ? 'selected' : '' ?>><?= escapeHtml($row['contact_name']) ?></option>
<?php }
} ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-address-book"></i></span>
<select class="form-select select2" name="contacts[]" id="eventContactsSelect" multiple data-placeholder="Contacts">
<?php
if ($form_client_id) {
$sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_title, contact_email, contact_photo FROM contacts WHERE contact_client_id = $form_client_id AND contact_archived_at IS NULL ORDER BY contact_primary DESC, contact_technical DESC, contact_name");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['contact_id']) ?>"<?= selectOptionContact($form_client_id, $row['contact_name'], $row['contact_photo'], $row['contact_email'] ?: 'No email', $row['contact_id']) ?> <?= in_array(intval($row['contact_id']), $form_attendees['contacts'], true) ? 'selected' : '' ?>><?= escapeHtml($row['contact_name']) ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-12">
<input type="text" class="form-control" name="emails" value="<?= escapeHtml(implode(', ', $form_attendees['emails'])) ?>" placeholder="Others by email - vendor@example.com, ...">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-envelope"></i></span>
<input type="text" class="form-control" name="emails" value="<?= escapeHtml(implode(', ', $form_attendees['emails'])) ?>" placeholder="Others by email - vendor@example.com, ...">
</div>
</div>
</div>
</div>

View File

@@ -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 <strong>Add calendar</strong> &rarr; <strong>Subscribe from web</strong>.',
'Paste the link, give it a name and a colour, and <strong>Import</strong>. Classic Outlook: <em>Account settings</em> &rarr; <em>Internet Calendars</em> &rarr; <em>New</em>.',
'Paste the link, give it a name and a color, and <strong>Import</strong>. Classic Outlook: <em>Account settings</em> &rarr; <em>Internet Calendars</em> &rarr; <em>New</em>.',
'<span class="text-body-secondary">Outlook refreshes subscribed calendars on its own schedule, usually every few hours.</span>',
]],
'apple' => ['iPhone & Mac', 'fab fa-apple', [

View File

@@ -112,7 +112,7 @@ $has_pem = trim(html_entity_decode($certificate_public_key, ENT_QUOTES, 'UTF-8')
<?php } ?>
</select>
</div>
<div class="form-text">The client's domain it is for - left to itself, the one the host is under.</div>
<div class="form-text">The client's domain it is for. Left blank, it is the domain the host is under.</div>
<?php } else { ?>
<div class="form-text mt-0">Matched to the client's domain the host is under when it's saved.</div>
<?php } ?>

View File

@@ -12,7 +12,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring me-2"></i>New Tickets for <strong><?= $count ?></strong> Client(s)</h5>
<h5 class="modal-title"><i class="fas fa-fw fa-life-ring me-2"></i>New Tickets for <strong><?= $count ?></strong> client<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
@@ -24,7 +24,10 @@ ob_start();
<div class="mb-3">
<label>Subject <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="bulk_subject" placeholder="Enter a subject" maxlength="200" required>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
<input type="text" class="form-control" name="bulk_subject" placeholder="Enter a subject" maxlength="200" required>
</div>
</div>
<div class="mb-3">

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-clock me-2"></i>Set Hourly Rate for <strong><?= $count ?></strong> Client(s)</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-clock me-2"></i>Set Hourly Rate for <strong><?= $count ?></strong> client<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-briefcase me-2"></i>Set Industry for <strong><?= $count ?></strong> Client(s)</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-briefcase me-2"></i>Set Industry for <strong><?= $count ?></strong> client<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -22,7 +22,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-calendar me-2"></i>Set Net Terms for <strong><?= $count ?></strong> Client(s)</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-calendar me-2"></i>Set Net Terms for <strong><?= $count ?></strong> client<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -10,7 +10,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-link me-2"></i>Set Referral for <strong><?= $count ?></strong> Clients</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-link me-2"></i>Set Referral for <strong><?= $count ?></strong> client<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open me-2"></i>Send Emails to <strong><?= $count ?></strong> Client(s)</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open me-2"></i>Send Emails to <strong><?= $count ?></strong> client<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -16,7 +16,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt me-2"></i>Assign Location to <strong><?= $count ?></strong> Contacts</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt me-2"></i>Assign Location to <strong><?= $count ?></strong> contact<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-users me-2"></i>Set Department / Group for <strong><?= $count ?></strong> Contacts</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-users me-2"></i>Set Department / Group for <strong><?= $count ?></strong> contact<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-phone-alt me-2"></i>Set Phone Number for <strong><?= $count ?></strong> Contacts</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-phone-alt me-2"></i>Set Phone Number for <strong><?= $count ?></strong> contact<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-user-shield me-2"></i>Set Roles for <strong><?= $count ?></strong> Contacts</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-user-shield me-2"></i>Set Roles for <strong><?= $count ?></strong> contact<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">

View File

@@ -11,7 +11,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open me-2"></i>Send Email to <strong><?= $count ?></strong> Contacts</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open me-2"></i>Send Email to <strong><?= $count ?></strong> contact<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">

View File

@@ -73,6 +73,7 @@ ob_start();
<div data-share-done hidden>
<p class="mb-2"><i class="fas fa-check-circle text-success me-2"></i>The link is made, and copied.</p>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-link"></i></span>
<input type="text" class="form-control" readonly data-share-link onclick="this.select();">
<button class="btn btn-outline-secondary" type="button" data-share-copy title="Copy link"><i class="far fa-fw fa-copy"></i></button>
</div>

View File

@@ -214,7 +214,10 @@ $form_id = 'locationForm' . ($location_form_mode === 'edit' ? $location_id : 'Ne
</div>
<div class="col-md-4">
<label class="form-label">Extension</label>
<input type="text" class="form-control" name="extension" value="<?= $location_extension ?>" placeholder="ext." maxlength="10" inputmode="numeric">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-hashtag"></i></span>
<input type="text" class="form-control" name="extension" value="<?= $location_extension ?>" placeholder="ext." maxlength="10" inputmode="numeric">
</div>
</div>
<div class="col-md-8">
<label class="form-label">Fax</label>

View File

@@ -106,7 +106,7 @@ $value = function ($key) use ($form) {
<label class="form-label">Description</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-align-left"></i></span>
<input type="text" class="form-control" name="description" placeholder="Workstations and printers, internet only, 500/500 fibre" value="<?= $value('network_description') ?>">
<input type="text" class="form-control" name="description" placeholder="Workstations and printers, internet only, 500/500 fiber" value="<?= $value('network_description') ?>">
</div>
</div>

View File

@@ -27,7 +27,10 @@ ob_start();
<div class="modal-body">
<label class="form-label">Due</label>
<input type="date" class="form-control" name="due_date">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-flag-checkered"></i></span>
<input type="date" class="form-control" name="due_date">
</div>
<div class="form-text">Leave it empty to clear the due date. Open projects only, and not one that starts after it.</div>
</div>

View File

@@ -27,16 +27,19 @@ ob_start();
<div class="modal-body">
<label class="form-label">Manager</label>
<select class="form-select select2" name="project_manager">
<option value="0" data-icon="fas fa-user-slash">No manager</option>
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1 AND user_status = 1 AND user_archived_at IS NULL
ORDER BY user_id = " . intval($session_user_id) . " DESC, user_name ASC");
while ($row = mysqli_fetch_assoc($sql)) {
$user_id = intval($row['user_id']); ?>
<option value="<?= $user_id ?>"<?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar'] ?? '') ?>><?= escapeHtml($row['user_name']) ?><?= $user_id === intval($session_user_id) ? ' (me)' : '' ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="project_manager">
<option value="0" data-icon="fas fa-user-slash">No manager</option>
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1 AND user_status = 1 AND user_archived_at IS NULL
ORDER BY user_id = " . intval($session_user_id) . " DESC, user_name ASC");
while ($row = mysqli_fetch_assoc($sql)) {
$user_id = intval($row['user_id']); ?>
<option value="<?= $user_id ?>"<?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar'] ?? '') ?>><?= escapeHtml($row['user_name']) ?><?= $user_id === intval($session_user_id) ? ' (me)' : '' ?></option>
<?php } ?>
</select>
</div>
<div class="form-text">Open projects only - completed and archived ones keep theirs. The new manager gets a notification.</div>
</div>

View File

@@ -41,44 +41,56 @@ ob_start();
<div class="mb-3">
<label class="form-label">Which</label>
<select class="form-select select2" name="show">
<?php foreach ($views as $key => $view) { ?>
<option value="<?= escapeHtml($key) ?>" <?= $show_filter === $key ? 'selected' : '' ?>><?= escapeHtml($view['label']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-eye"></i></span>
<select class="form-select select2" name="show">
<?php foreach ($views as $key => $view) { ?>
<option value="<?= escapeHtml($key) ?>" <?= $show_filter === $key ? 'selected' : '' ?>><?= escapeHtml($view['label']) ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="mb-3">
<label class="form-label">Search</label>
<input type="text" class="form-control" name="q" value="<?= stripslashes(escapeHtml($q_filter)) ?>" placeholder="Number, name, client, manager">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-search"></i></span>
<input type="text" class="form-control" name="q" value="<?= stripslashes(escapeHtml($q_filter)) ?>" placeholder="Number, name, client, manager">
</div>
</div>
<div class="mb-3">
<label class="form-label">Manager</label>
<select class="form-select select2" name="manager">
<option value="">- Any manager -</option>
<option value="none" <?= $manager_filter === 'none' ? 'selected' : '' ?>>No manager</option>
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1 AND EXISTS (SELECT 1 FROM projects WHERE project_manager = user_id) ORDER BY user_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['user_id']) ?>" <?= $manager_filter === (string) intval($row['user_id']) ? 'selected' : '' ?><?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar'] ?? '') ?>><?= escapeHtml($row['user_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="manager">
<option value="">- Any manager -</option>
<option value="none" <?= $manager_filter === 'none' ? 'selected' : '' ?>>No manager</option>
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1 AND EXISTS (SELECT 1 FROM projects WHERE project_manager = user_id) ORDER BY user_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['user_id']) ?>" <?= $manager_filter === (string) intval($row['user_id']) ? 'selected' : '' ?><?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar'] ?? '') ?>><?= escapeHtml($row['user_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<?php if (!$client_id) { ?>
<div class="mb-3">
<label class="form-label">Client</label>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="internal" <?= $client_filter === 'internal' ? 'selected' : '' ?>>Internal (no client)</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients
WHERE EXISTS (SELECT 1 FROM projects WHERE project_client_id = client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>" <?= $client_filter === (string) intval($row['client_id']) ? 'selected' : '' ?><?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="internal" <?= $client_filter === 'internal' ? 'selected' : '' ?>>Internal (no client)</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients
WHERE EXISTS (SELECT 1 FROM projects WHERE project_client_id = client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>" <?= $client_filter === (string) intval($row['client_id']) ? 'selected' : '' ?><?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<?php } ?>

View File

@@ -19,7 +19,9 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<?php if ($is_new && !$form_client_id && !isset($form['fixed_client'])) { ?>
<div class="mb-3">
<label class="form-label">Client <strong class="text-danger">*</strong></label>
<select class="form-select select2" name="client_id" id="projectClientSelect" required>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" id="projectClientSelect" required>
<option value="">- Pick a client -</option>
<option value="0" data-icon="fas fa-building" data-description="Our own work - no client">Internal</option>
<?php
@@ -27,7 +29,8 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>"<?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
</select>
</div>
</div>
<?php } elseif ($is_new) { ?>
<input type="hidden" name="client_id" id="projectClientId" value="<?= $form_client_id ?>">
@@ -35,7 +38,10 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<div class="mb-3">
<label class="form-label">Name <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="name" placeholder="Onboarding, server refresh, office move..." maxlength="255" value="<?= escapeHtml($form['project_name'] ?? '') ?>" required autofocus>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-project-diagram"></i></span>
<input type="text" class="form-control" name="name" placeholder="Onboarding, server refresh, office move..." maxlength="255" value="<?= escapeHtml($form['project_name'] ?? '') ?>" required autofocus>
</div>
</div>
<?php if ($is_new) {
@@ -50,6 +56,8 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
if (mysqli_num_rows($sql_templates)) { ?>
<div class="mb-3">
<label class="form-label">Template</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-cubes"></i></span>
<select class="form-select select2" name="project_template_id" id="projectTemplateSelect">
<option value="0">None - start empty</option>
<?php while ($row = mysqli_fetch_assoc($sql_templates)) {
@@ -59,6 +67,7 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
data-description="<?= escapeHtml(trim("$ticket_count ticket" . ($ticket_count === 1 ? '' : 's') . ($task_count ? ", $task_count task" . ($task_count === 1 ? '' : 's') : '') . ($row['project_template_description'] ? ' - ' . $row['project_template_description'] : ''))) ?>"><?= escapeHtml($row['project_template_name']) ?></option>
<?php } ?>
</select>
</div>
<div class="form-check mt-2" id="projectAssignToManager" hidden>
<input class="form-check-input" type="checkbox" name="assign_to_manager" value="1" id="assignToManager" checked>
<label class="form-check-label small" for="assignToManager">Assign the template's tickets to the manager</label>
@@ -70,6 +79,8 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<div class="row g-3 mb-3">
<div class="col-md-6">
<label class="form-label">Manager</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="project_manager">
<option value="0" data-icon="fas fa-user-slash">No manager</option>
<?php
@@ -81,9 +92,12 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<option value="<?= $user_id ?>" <?= $user_id === $form_manager_id ? 'selected' : '' ?><?= selectOptionUser($row['user_id'], $row['user_name'], $row['user_avatar'] ?? '') ?>><?= escapeHtml($row['user_name']) ?><?= $user_id === intval($session_user_id) ? ' (me)' : '' ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-6" id="projectContactField" <?= $form_client_id || ($is_new && !isset($form['fixed_client'])) ? '' : 'hidden' ?>>
<label class="form-label">Client contact</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-address-card"></i></span>
<select class="form-select select2" name="contact_id" id="projectContactSelect" data-selected="<?= $form_contact_id ?>">
<option value="0">Nobody</option>
<?php if ($form_client_id) {
@@ -96,22 +110,30 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<?php }
} ?>
</select>
<div class="form-text">Who signs it off at the client. Its template tickets go to them.</div>
</div>
<div class="form-text">Who signs it off at the client - tickets from a template go to them.</div>
</div>
</div>
<div class="row g-3 mb-3">
<div class="col-md-4">
<label class="form-label">Start</label>
<input type="date" class="form-control" name="start" id="projectStart" value="<?= escapeHtml($form['project_start'] ?? '') ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-play"></i></span>
<input type="date" class="form-control" name="start" id="projectStart" value="<?= escapeHtml($form['project_start'] ?? '') ?>">
</div>
</div>
<div class="col-md-4">
<label class="form-label">Due</label>
<input type="date" class="form-control" name="due_date" id="projectDue" value="<?= escapeHtml($form['project_due'] ?? '') ?>" min="<?= escapeHtml($form['project_start'] ?? '') ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-flag-checkered"></i></span>
<input type="date" class="form-control" name="due_date" id="projectDue" value="<?= escapeHtml($form['project_due'] ?? '') ?>" min="<?= escapeHtml($form['project_start'] ?? '') ?>">
</div>
</div>
<div class="col-md-4">
<label class="form-label">Budget</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-hourglass-half"></i></span>
<input type="number" class="form-control" name="budget_hours" min="0" max="999999" step="0.25" inputmode="decimal" placeholder="None" value="<?= floatval($form['project_budget_hours'] ?? 0) > 0 ? escapeHtml(rtrim(rtrim((string) $form['project_budget_hours'], '0'), '.')) : '' ?>">
<span class="input-group-text">hours</span>
</div>

View File

@@ -59,14 +59,17 @@ $item_types = rackItemTypes();
<div class="mb-3" data-rack-kind="asset">
<label class="form-label">Asset <strong class="text-danger">*</strong></label>
<select class="form-select select2" name="asset" id="rackItemAsset">
<option value="">- Select an asset -</option>
<?php foreach ($asset_options as $asset_option) {
$asset_option_id = intval($asset_option['asset_id']);
?>
<option value="<?= $asset_option_id ?>" data-asset-type="<?= escapeHtml($asset_option['asset_type']) ?>" <?php if ($asset_option_id === $unit_asset_id) { echo "selected"; } ?><?= selectOptionAsset($asset_option['asset_type'], trim($asset_option['asset_make'] . ' ' . $asset_option['asset_model'])) ?>><?= escapeHtml($asset_option['asset_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-desktop"></i></span>
<select class="form-select select2" name="asset" id="rackItemAsset">
<option value="">- Select an asset -</option>
<?php foreach ($asset_options as $asset_option) {
$asset_option_id = intval($asset_option['asset_id']);
?>
<option value="<?= $asset_option_id ?>" data-asset-type="<?= escapeHtml($asset_option['asset_type']) ?>" <?php if ($asset_option_id === $unit_asset_id) { echo "selected"; } ?><?= selectOptionAsset($asset_option['asset_type'], trim($asset_option['asset_make'] . ' ' . $asset_option['asset_model'])) ?>><?= escapeHtml($asset_option['asset_name']) ?></option>
<?php } ?>
</select>
</div>
<?php if (empty($asset_options)) { ?>
<div class="form-text">Every asset this client has is already racked.</div>
<?php } ?>
@@ -74,11 +77,14 @@ $item_types = rackItemTypes();
<div class="mb-3" data-rack-kind="other">
<label class="form-label">What is it</label>
<select class="form-select select2" name="type" id="rackItemType">
<?php foreach ($item_types as $item_type => $item_type_style) { ?>
<option value="<?= escapeHtml($item_type) ?>" <?php if ($unit_type === $item_type) { echo "selected"; } ?><?= selectOptionData(['icon' => 'fas ' . $item_type_style['icon']]) ?>><?= escapeHtml($item_type) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-shapes"></i></span>
<select class="form-select select2" name="type" id="rackItemType">
<?php foreach ($item_types as $item_type => $item_type_style) { ?>
<option value="<?= escapeHtml($item_type) ?>" <?php if ($unit_type === $item_type) { echo "selected"; } ?><?= selectOptionData(['icon' => 'fas ' . $item_type_style['icon']]) ?>><?= escapeHtml($item_type) ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="mb-3">
@@ -86,7 +92,10 @@ $item_types = rackItemTypes();
<span data-rack-kind="asset">Label <span class="text-secondary fw-normal">(optional, shown under the asset name)</span></span>
<span data-rack-kind="other">Name <strong class="text-danger">*</strong></span>
</label>
<input type="text" class="form-control" name="name" id="rackItemName" maxlength="200" value="<?= $unit_device ?>" placeholder="24-port Cat6 patch panel">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
<input type="text" class="form-control" name="name" id="rackItemName" maxlength="200" value="<?= $unit_device ?>" placeholder="24-port Cat6 patch panel">
</div>
</div>
<div class="row g-3 mb-1">
@@ -100,6 +109,7 @@ $item_types = rackItemTypes();
<div class="col-sm-4">
<label class="form-label" for="rackItemHeight">Height <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-arrows-alt-v"></i></span>
<input type="number" class="form-control" name="unit_height" id="rackItemHeight" min="1" max="<?= $rack_units ?>" value="<?= $unit_height ?>" required>
<span class="input-group-text">U</span>
</div>
@@ -133,7 +143,10 @@ $item_types = rackItemTypes();
</div>
<div class="col-sm-7">
<label class="form-label">Notes</label>
<input type="text" class="form-control" name="notes" maxlength="255" placeholder="Rails in the box, PSU A on PDU-A port 3" value="<?= $unit_notes ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-sticky-note"></i></span>
<input type="text" class="form-control" name="notes" maxlength="255" placeholder="Rails in the box, PSU A on PDU-A port 3" value="<?= $unit_notes ?>">
</div>
</div>
</div>

View File

@@ -48,17 +48,21 @@ if ($rack_type !== '' && !isset($rack_type_options[$rack_type])) {
<div class="col-md-5">
<label class="form-label">Type <strong class="text-danger">*</strong></label>
<select class="form-select select2" name="type" required>
<option value="">- Type -</option>
<?php foreach ($rack_type_options as $rack_type_option => $rack_type_option_data) { ?>
<option <?php if ($rack_type === $rack_type_option) { echo "selected"; } ?><?= $rack_type_option_data ?>><?= $rack_type_option ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-server"></i></span>
<select class="form-select select2" name="type" required>
<option value="">- Type -</option>
<?php foreach ($rack_type_options as $rack_type_option => $rack_type_option_data) { ?>
<option <?php if ($rack_type === $rack_type_option) { echo "selected"; } ?><?= $rack_type_option_data ?>><?= $rack_type_option ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-4">
<label class="form-label">Height <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-arrows-alt-v"></i></span>
<input type="number" class="form-control" name="units" placeholder="42" min="<?= max(1, $rack_highest_used_unit) ?>" max="70" value="<?= $rack_units ?: '' ?>" required>
<span class="input-group-text">U</span>
</div>
@@ -69,10 +73,13 @@ if ($rack_type !== '' && !isset($rack_type_options[$rack_type])) {
<div class="col-md-8">
<label class="form-label">Unit numbering</label>
<select class="form-select" name="units_descending">
<option value="0" <?php if (!$rack_units_descending) { echo "selected"; } ?>>U1 at the bottom (standard)</option>
<option value="1" <?php if ($rack_units_descending) { echo "selected"; } ?>>U1 at the top</option>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-sort-numeric-down"></i></span>
<select class="form-select" name="units_descending">
<option value="0" <?php if (!$rack_units_descending) { echo "selected"; } ?>>U1 at the bottom (standard)</option>
<option value="1" <?php if ($rack_units_descending) { echo "selected"; } ?>>U1 at the top</option>
</select>
</div>
</div>
<div class="col-md-7">
@@ -93,17 +100,20 @@ if ($rack_type !== '' && !isset($rack_type_options[$rack_type])) {
<div class="col-md-6">
<label class="form-label">Location</label>
<select class="form-select select2" name="location">
<option value="">- Location -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
while ($row = mysqli_fetch_assoc($sql)) {
$location_id_select = intval($row['location_id']);
$location_name_select = escapeHtml($row['location_name']);
?>
<option value="<?= $location_id_select ?>" <?php if ($rack_location_id === $location_id_select) { echo "selected"; } ?>><?= $location_name_select ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-map-marker-alt"></i></span>
<select class="form-select select2" name="location">
<option value="">- Location -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
while ($row = mysqli_fetch_assoc($sql)) {
$location_id_select = intval($row['location_id']);
$location_name_select = escapeHtml($row['location_name']);
?>
<option value="<?= $location_id_select ?>" <?php if ($rack_location_id === $location_id_select) { echo "selected"; } ?>><?= $location_name_select ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-6">

View File

@@ -36,16 +36,22 @@ ob_start();
<div class="modal-body">
<div class="mb-3">
<label class="form-label">Importance</label>
<select class="form-select select2" name="importance">
<option value="">- No change -</option>
<?php foreach (SERVICE_IMPORTANCE as $importance) { ?>
<option value="<?= $importance ?>"><?= $importance ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-thermometer-half"></i></span>
<select class="form-select select2" name="importance">
<option value="">- No change -</option>
<?php foreach (SERVICE_IMPORTANCE as $importance) { ?>
<option value="<?= $importance ?>"><?= $importance ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="mb-3">
<label class="form-label">Category</label>
<input type="text" class="form-control" name="category" list="serviceBulkCategories" maxlength="50" placeholder="- No change -">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-folder"></i></span>
<input type="text" class="form-control" name="category" list="serviceBulkCategories" maxlength="50" placeholder="- No change -">
</div>
<datalist id="serviceBulkCategories">
<?php foreach ($categories as $category) { ?>
<option value="<?= escapeHtml($category) ?>"></option>
@@ -54,12 +60,15 @@ ob_start();
</div>
<div class="mb-0">
<label class="form-label">Review</label>
<select class="form-select select2" name="review_interval">
<option value="">- No change -</option>
<?php foreach (SERVICE_REVIEW_INTERVALS as $months => $label) { ?>
<option value="<?= $months ?>"><?= $label ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-redo"></i></span>
<select class="form-select select2" name="review_interval">
<option value="">- No change -</option>
<?php foreach (SERVICE_REVIEW_INTERVALS as $months => $label) { ?>
<option value="<?= $months ?>"><?= $label ?></option>
<?php } ?>
</select>
</div>
<div class="form-text">A schedule sets each one's next review that long after its last one - or from today if that has passed.</div>
</div>
</div>

View File

@@ -42,46 +42,61 @@ ob_start();
<div class="mb-3">
<label class="form-label">Which</label>
<select class="form-select select2" name="show">
<?php foreach ($views as $key => $view) { ?>
<option value="<?= escapeHtml($key) ?>" <?= $show_filter === $key ? 'selected' : '' ?>><?= escapeHtml($view['label']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-eye"></i></span>
<select class="form-select select2" name="show">
<?php foreach ($views as $key => $view) { ?>
<option value="<?= escapeHtml($key) ?>" <?= $show_filter === $key ? 'selected' : '' ?>><?= escapeHtml($view['label']) ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="row g-3 mb-3">
<div class="col-md-6">
<label class="form-label">Importance</label>
<select class="form-select select2" name="importance">
<option value="">- Any importance -</option>
<?php foreach (SERVICE_IMPORTANCE as $importance) { ?>
<option value="<?= $importance ?>" <?= $importance_filter === $importance ? 'selected' : '' ?>><?= $importance ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-thermometer-half"></i></span>
<select class="form-select select2" name="importance">
<option value="">- Any importance -</option>
<?php foreach (SERVICE_IMPORTANCE as $importance) { ?>
<option value="<?= $importance ?>" <?= $importance_filter === $importance ? 'selected' : '' ?>><?= $importance ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-6">
<label class="form-label">Category</label>
<input type="text" class="form-control" name="category" value="<?= escapeHtml($category_filter) ?>" placeholder="Any category">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-folder"></i></span>
<input type="text" class="form-control" name="category" value="<?= escapeHtml($category_filter) ?>" placeholder="Any category">
</div>
</div>
</div>
<div class="mb-3">
<label class="form-label">Search</label>
<input type="text" class="form-control" name="q" value="<?= stripslashes(escapeHtml($q_filter)) ?>" placeholder="Name, description, category, client">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-search"></i></span>
<input type="text" class="form-control" name="q" value="<?= stripslashes(escapeHtml($q_filter)) ?>" placeholder="Name, description, category, client">
</div>
</div>
<?php if (!$client_id) { ?>
<div class="mb-3">
<label class="form-label">Client</label>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients
WHERE client_archived_at IS NULL AND EXISTS (SELECT 1 FROM services WHERE service_client_id = client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>" <?= $client_filter === (string) intval($row['client_id']) ? 'selected' : '' ?><?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients
WHERE client_archived_at IS NULL AND EXISTS (SELECT 1 FROM services WHERE service_client_id = client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>" <?= $client_filter === (string) intval($row['client_id']) ? 'selected' : '' ?><?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<?php } ?>

View File

@@ -34,14 +34,17 @@ $importance_styles = [
<?php if ($is_new && !$form_client_id) { ?>
<div class="mb-3">
<label class="form-label">Client <strong class="text-danger">*</strong></label>
<select class="form-select select2" name="client_id" required>
<option value="">- Pick a client -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>"<?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Pick a client -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) { ?>
<option value="<?= intval($row['client_id']) ?>"<?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<?php } elseif ($is_new) { ?>
<input type="hidden" name="client_id" value="<?= $form_client_id ?>">
@@ -50,11 +53,17 @@ $importance_styles = [
<div class="row g-3 mb-3">
<div class="col-md-7">
<label class="form-label">Name <strong class="text-danger">*</strong></label>
<input type="text" class="form-control" name="name" placeholder="Email, Backup, Practice management, Phones..." maxlength="200" value="<?= escapeHtml($form['service_name'] ?? '') ?>" required autofocus>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-concierge-bell"></i></span>
<input type="text" class="form-control" name="name" placeholder="Email, Backup, Practice management, Phones..." maxlength="200" value="<?= escapeHtml($form['service_name'] ?? '') ?>" required autofocus>
</div>
</div>
<div class="col-md-5">
<label class="form-label">Category</label>
<input type="text" class="form-control" name="category" list="serviceCategorySuggestions" placeholder="Email, Backup, Network..." maxlength="50" value="<?= escapeHtml($form['service_category'] ?? '') ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-folder"></i></span>
<input type="text" class="form-control" name="category" list="serviceCategorySuggestions" placeholder="Email, Backup, Network..." maxlength="50" value="<?= escapeHtml($form['service_category'] ?? '') ?>">
</div>
<datalist id="serviceCategorySuggestions">
<?php foreach ($category_suggestions as $suggestion) { ?>
<option value="<?= escapeHtml($suggestion) ?>"></option>
@@ -65,7 +74,10 @@ $importance_styles = [
<div class="mb-3">
<label class="form-label">Description</label>
<input type="text" class="form-control" name="description" placeholder="Microsoft 365 mail for all staff, Veeam to the NAS and offsite..." maxlength="200" value="<?= escapeHtml($form['service_description'] ?? '') ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-align-left"></i></span>
<input type="text" class="form-control" name="description" placeholder="Microsoft 365 mail for all staff, Veeam to the NAS and offsite..." maxlength="200" value="<?= escapeHtml($form['service_description'] ?? '') ?>">
</div>
</div>
<div class="mb-3">
@@ -94,20 +106,26 @@ $importance_styles = [
<div class="row g-3 <?= $is_new && $form_client_id ? 'mb-3' : 'mb-0' ?>">
<div class="col-md-6">
<label class="form-label">Review it</label>
<select class="form-select select2" name="review_interval" id="serviceReviewInterval">
<?php foreach (SERVICE_REVIEW_INTERVALS as $months => $label) { ?>
<option value="<?= $months ?>" <?= $form_interval === $months ? 'selected' : '' ?> data-icon="far <?= $months ? 'fa-calendar-check' : 'fa-calendar' ?>"><?= $label ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-redo"></i></span>
<select class="form-select select2" name="review_interval" id="serviceReviewInterval">
<?php foreach (SERVICE_REVIEW_INTERVALS as $months => $label) { ?>
<option value="<?= $months ?>" <?= $form_interval === $months ? 'selected' : '' ?> data-icon="far <?= $months ? 'fa-calendar-check' : 'fa-calendar' ?>"><?= $label ?></option>
<?php } ?>
</select>
</div>
<div class="form-text">Check it still matches what is out there - a QBR is a good time.</div>
</div>
<div class="col-md-6">
<label class="form-label">Next review</label>
<input type="date" class="form-control" name="review_due" id="serviceReviewDue" value="<?= escapeHtml($form['service_review_due'] ?? '') ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar-check"></i></span>
<input type="date" class="form-control" name="review_due" id="serviceReviewDue" value="<?= escapeHtml($form['service_review_due'] ?? '') ?>">
</div>
<?php if (!empty($form['service_reviewed_at'])) { ?>
<div class="form-text">Last reviewed <?= escapeHtml(date('M j, Y', strtotime($form['service_reviewed_at']))) ?>.</div>
<?php } else { ?>
<div class="form-text">Left empty, it follows the schedule.</div>
<div class="form-text">Leave it empty to follow the schedule.</div>
<?php } ?>
</div>
</div>
@@ -133,12 +151,15 @@ $importance_styles = [
<?php foreach ($pickers as $type => $candidates) {
$entity = LINK_ENTITIES[$type]; ?>
<div class="col-md-6">
<label class="form-label small mb-1"><i class="fas fa-fw <?= $entity['icon'] ?> text-secondary me-1"></i><?= $type === 'credential' ? 'Logins' : ($type === 'contact' ? 'People' : $entity['plural']) ?></label>
<select class="form-select select2" name="<?= $entity['table'] ?>[]" multiple data-placeholder="<?= escapeHtml($picker_hints[$type]) ?>">
<?php foreach ($candidates as $candidate) { ?>
<option value="<?= intval($candidate['id']) ?>"<?= linkOptionData($type, $candidate, $form_client_id) ?>><?= escapeHtml($candidate['name']) ?></option>
<?php } ?>
</select>
<label class="form-label"><?= $type === 'credential' ? 'Logins' : ($type === 'contact' ? 'People' : $entity['plural']) ?></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw <?= $entity['icon'] ?>"></i></span>
<select class="form-select select2" name="<?= $entity['table'] ?>[]" multiple data-placeholder="<?= escapeHtml($picker_hints[$type]) ?>">
<?php foreach ($candidates as $candidate) { ?>
<option value="<?= intval($candidate['id']) ?>"<?= linkOptionData($type, $candidate, $form_client_id) ?>><?= escapeHtml($candidate['name']) ?></option>
<?php } ?>
</select>
</div>
</div>
<?php } ?>
</div>

View File

@@ -35,14 +35,17 @@ ob_start();
<div class="modal-body">
<?php if ($candidates) { ?>
<label class="form-label">Which tickets?</label>
<select class="form-select select2" name="ticket_ids[]" multiple required data-placeholder="Search by number or subject">
<?php foreach ($candidates as $row) {
$is_open = ticketIsOpen($row); ?>
<option value="<?= intval($row['ticket_id']) ?>" data-icon="fas fa-<?= $is_open ? 'life-ring' : 'check-circle' ?>"
data-description="<?= escapeHtml($row['ticket_prefix'] . $row['ticket_number'] . ' · ' . ($is_open ? 'Open' : 'Closed') . ' · ' . date('M j, Y', strtotime($row['ticket_created_at']))) ?>"
data-keywords="<?= escapeHtml($row['ticket_prefix'] . $row['ticket_number']) ?>"><?= escapeHtml($row['ticket_subject']) ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-life-ring"></i></span>
<select class="form-select select2" name="ticket_ids[]" multiple required data-placeholder="Search by number or subject">
<?php foreach ($candidates as $row) {
$is_open = ticketIsOpen($row); ?>
<option value="<?= intval($row['ticket_id']) ?>" data-icon="fas fa-<?= $is_open ? 'life-ring' : 'check-circle' ?>"
data-description="<?= escapeHtml($row['ticket_prefix'] . $row['ticket_number'] . ' · ' . ($is_open ? 'Open' : 'Closed') . ' · ' . date('M j, Y', strtotime($row['ticket_created_at']))) ?>"
data-keywords="<?= escapeHtml($row['ticket_prefix'] . $row['ticket_number']) ?>"><?= escapeHtml($row['ticket_subject']) ?></option>
<?php } ?>
</select>
</div>
<div class="form-text">Tickets on its assets show on the service already - this is for the rest.</div>
<?php } else { ?>
<div class="itflow-asset-empty py-4">

View File

@@ -58,15 +58,21 @@ ob_start();
<div class="row g-3 mb-3">
<div class="col-md-6">
<label class="form-label">Review it</label>
<select class="form-select select2" name="review_interval">
<?php foreach (SERVICE_REVIEW_INTERVALS as $months => $label) { ?>
<option value="<?= $months ?>" <?= $interval === $months ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
</select>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-redo"></i></span>
<select class="form-select select2" name="review_interval">
<?php foreach (SERVICE_REVIEW_INTERVALS as $months => $label) { ?>
<option value="<?= $months ?>" <?= $interval === $months ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-6">
<label class="form-label">Next review</label>
<input type="date" class="form-control" name="review_due" value="<?= $interval ? escapeHtml($next) : '' ?>">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar-check"></i></span>
<input type="date" class="form-control" name="review_due" value="<?= $interval ? escapeHtml($next) : '' ?>">
</div>
</div>
</div>

View File

@@ -56,7 +56,10 @@ ob_start();
<label class="btn btn-outline-secondary btn-sm" for="renewTermDate"><i class="fas fa-calendar-alt me-1"></i>A date</label>
</div>
<div class="mb-3" data-renew-date-box hidden>
<input type="date" class="form-control" name="renew_date" max="2999-12-31" data-renew-date>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-calendar-alt"></i></span>
<input type="date" class="form-control" name="renew_date" max="2999-12-31" data-renew-date>
</div>
</div>
<div class="form-text mb-3">Each date moves on from its current renewal date, or from today if it has already passed.</div>

View File

@@ -13,7 +13,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-user-check me-2"></i>Assign Project to <strong><?= $count ?></strong> Tickets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-user-check me-2"></i>Assign Project to <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -13,7 +13,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-user-check me-2"></i>Assign Agent to <strong><?= $count ?></strong> Tickets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-user-check me-2"></i>Assign Agent to <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -13,7 +13,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-layer-group me-2"></i>Set Category for <strong><?= $count ?></strong> Tickets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-layer-group me-2"></i>Set Category for <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -13,7 +13,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-thermometer-half me-2"></i>Set Priority for <strong><?= $count ?></strong> Tickets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-thermometer-half me-2"></i>Set Priority for <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -41,7 +41,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-clone me-2"></i>Merge & close <strong><?= $count ?></strong> tickets</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-clone me-2"></i>Merge & close <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>

View File

@@ -13,7 +13,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-paper-plane me-2"></i>Update & Reply <strong><?= $count ?></strong> Tickets</h5>
<h5 class="modal-title"><i class="fas fa-fw fa-paper-plane me-2"></i>Update & Reply <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
@@ -48,7 +48,10 @@ ob_start();
<div class="col-3">
<div class="mb-3">
<label>Time worked</label>
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-stopwatch"></i></span>
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
</div>
</div>
</div>
@@ -56,7 +59,7 @@ ob_start();
<div class="form-check">
<input type="checkbox" class="form-check-input" id="bulkPrivateReplyCheckbox" name="bulk_private_reply" value="1">
<label class="form-check-label" for="bulkPrivateReplyCheckbox">Mark as internal</label>
<small class="form-text text-muted">If checked this note will only be visible to agents.</small>
<small class="form-text text-muted">Only agents see it.</small>
</div>
</div>

View File

@@ -12,7 +12,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-check me-2"></i>Resolve <strong><?= $count ?></strong> Tickets</h5>
<h5 class="modal-title"><i class="fas fa-fw fa-check me-2"></i>Resolve <strong><?= $count ?></strong> ticket<?= $count === 1 ? '' : 's' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
@@ -29,15 +29,18 @@ ob_start();
<div class="col-3">
<div class="mb-3">
<label>Time worked</label>
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-stopwatch"></i></span>
<input class="form-control timepicker" id="time_worked" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="00:01:00" required/>
</div>
</div>
</div>
<div class="mb-3">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="bulkPrivateCheckbox" name="bulk_private_note" value="1">
<label class="form-check-label" for="bulkPrivateCheckbox">Mark as Internal</label>
<small class="form-text text-muted">If checked this note will only be visible to agents. The contact / watcher will not be informed this ticket was resolved.</small>
<label class="form-check-label" for="bulkPrivateCheckbox">Mark as internal</label>
<small class="form-text text-muted">Only agents see it, and the contact and watchers are not told the ticket was resolved.</small>
</div>
</div>

View File

@@ -252,7 +252,7 @@ ob_start();
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="qty" value="<?= roundToNearest15Min($ticket_total_reply_time) ?>" required>
</div>
<small class="form-text text-muted">
Based off Ticket time spent <strong><?= $ticket_total_reply_time ?></strong> in 15 Min Increments rounded up.
From the <strong><?= $ticket_total_reply_time ?></strong> worked on the ticket, rounded up to the next 15 minutes.
</small>
</div>
@@ -267,7 +267,7 @@ ob_start();
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="price" value="<?= number_format($client_rate, 2, '.', '') ?>" required>
</div>
<small class="form-text text-muted">
Based off Hourly Client rate of <strong><?= numfmt_format_currency($currency_format, $client_rate, $session_company_currency); ?></strong>
The client's hourly rate is <strong><?= numfmt_format_currency($currency_format, $client_rate, $session_company_currency); ?></strong>
</small>
</div>

View File

@@ -190,7 +190,7 @@ ob_start();
<input type="text" class="form-control" inputmode="decimal" pattern="-?[0-9]*\.?[0-9]{0,2}" name="price" value="<?= number_format($client_rate, 2, '.', '') ?>" required>
</div>
<small class="form-text text-muted">
Hourly Client rate is <strong><?= numfmt_format_currency($currency_format, $client_rate, $session_company_currency); ?></strong>
The client's hourly rate is <strong><?= numfmt_format_currency($currency_format, $client_rate, $session_company_currency); ?></strong>
</small>
</div>
</div>

View File

@@ -60,7 +60,10 @@ ob_start();
<div class="col-6 col-md-3">
<div class="mb-3">
<label>Time worked</label>
<input class="form-control" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="<?= $ticket_reply_time_worked_formatted ?>" required>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-stopwatch"></i></span>
<input class="form-control" name="time" type="text" placeholder="HH:MM:SS" pattern="([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])" value="<?= $ticket_reply_time_worked_formatted ?>" required>
</div>
</div>
</div>
<?php } ?>

View File

@@ -168,7 +168,10 @@ $form_id = 'vendorForm' . ($vendor_form_mode === 'edit' ? $vendor_id : 'New');
</div>
<div class="col-md-4">
<label class="form-label">Extension / option</label>
<input type="text" class="form-control" name="extension" value="<?= $vendor_extension ?>" placeholder="ext." maxlength="200" inputmode="numeric">
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-hashtag"></i></span>
<input type="text" class="form-control" name="extension" value="<?= $vendor_extension ?>" placeholder="ext." maxlength="200" inputmode="numeric">
</div>
</div>
<div class="col-md-6">
<label class="form-label">Support hours</label>
@@ -220,7 +223,7 @@ $form_id = 'vendorForm' . ($vendor_form_mode === 'edit' ? $vendor_id : 'New');
</div>
</div>
<div class="col-12">
<div class="form-text mt-0">What support asks for before they will talk - shown beside the support line, the PIN as dots until it is asked for.</div>
<div class="form-text mt-0">What support asks for to check it's you - shown beside the support line, with the PIN hidden until you click it.</div>
</div>
<div class="col-12">
<label class="form-label">Account manager</label>

View File

@@ -173,7 +173,7 @@ if (!$network || ($client_url && intval($network['network_client_id']) !== intva
</a>
<?php if ($can_delete) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_network=<?= $network_id ?>&csrf_token=<?= $csrf ?>"
data-confirm-text="<?= $network_name ?> and the addresses documented on it go for good. The devices on it are left on no network.">
data-confirm-text="<?= $network_name ?> and the addresses documented on it go for good. The devices on it are left with no network.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</a>
<?php } ?>

View File

@@ -240,7 +240,7 @@ $csrf = $_SESSION['csrf_token'];
</button>
<?php if ($can_delete) { ?>
<button class="dropdown-item text-danger text-bold confirm-link" type="submit" form="bulkActions" name="bulk_delete_networks"
data-confirm-text="The networks and the addresses documented on them go for good. The devices on them are left on no network.">
data-confirm-text="The networks and the addresses documented on them go for good. The devices on them are left with no network.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</button>
<?php } ?>
@@ -405,7 +405,7 @@ $csrf = $_SESSION['csrf_token'];
</a>
<?php if ($can_delete) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_network=<?= $network_id ?>&csrf_token=<?= $csrf ?>"
data-confirm-text="<?= $name ?> and the addresses documented on it go for good. The devices on it are left on no network.">
data-confirm-text="<?= $name ?> and the addresses documented on it go for good. The devices on it are left with no network.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</a>
<?php } ?>

View File

@@ -100,7 +100,7 @@ if (isset($_POST['add_asset'])) {
logAudit("Asset", "Create", "$session_name created asset $name", $client_id, $asset_id);
flashAlert("Asset <strong>$name</strong> created$alert_extended");
flashAlert("Asset <strong>" . stripslashes($name) . "</strong> 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 <strong>$name</strong> edited");
flashAlert("Asset <strong>" . stripslashes($name) . "</strong> 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 <strong>$asset_name</strong> archived", 'error');
flashAlert("Asset <strong>" . stripslashes($asset_name) . "</strong> 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 <strong>$asset_name</strong> Restored");
flashAlert("Asset <strong>" . stripslashes($asset_name) . "</strong> restored");
redirect();
@@ -270,7 +270,7 @@ if (isset($_GET['delete_asset'])) {
logAudit("Asset", "Delete", "$session_name deleted asset $asset_name", $client_id);
flashAlert("Asset <strong>$asset_name</strong> deleted");
flashAlert("Asset <strong>" . stripslashes($asset_name) . "</strong> 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 <strong>$asset_note_type</strong> deleted.", 'error');
flashAlert("Note <strong>$asset_note_type</strong> 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 <strong>$asset_count</strong> assets to location <strong>$location_name</strong>");
flashAlert("<strong>$asset_count</strong> asset" . ($asset_count === 1 ? '' : 's') . " assigned to location <strong>" . stripslashes($location_name) . "</strong>");
}
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 <strong>$asset_count</strong> assets to location <strong>$physical_location</strong>");
flashAlert("Physical location of <strong>$asset_count</strong> asset" . ($asset_count === 1 ? '' : 's') . " set to <strong>" . stripslashes($physical_location) . "</strong>");
}
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 <strong>$asset_count</strong> assets to <strong>$new_client_name</strong>.");
flashAlert("Transferred <strong>$asset_count</strong> asset" . ($asset_count === 1 ? '' : 's') . " to <strong>" . stripslashes($new_client_name) . "</strong>");
}
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 <strong>$asset_count</strong> assets to contact <strong>$contact_name</strong>");
flashAlert("<strong>$asset_count</strong> asset" . ($asset_count === 1 ? '' : 's') . " assigned to <strong>" . stripslashes($contact_name) . "</strong>");
}
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 <strong>$status</strong> on <strong>$asset_count</strong> assets.");
flashAlert("Status set to <strong>" . stripslashes($status) . "</strong> on <strong>$asset_count</strong> 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 <strong>$count</strong> 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 <strong>$asset_name</strong> linked with credential <strong>$credential_name</strong>");
flashAlert("Asset <strong>" . stripslashes($asset_name) . "</strong> linked with credential <strong>" . stripslashes($credential_name) . "</strong>");
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 <strong>$credential_name</strong> unlinked from Asset <strong>$asset_name</strong>");
flashAlert("Credential <strong>" . stripslashes($credential_name) . "</strong> unlinked from asset <strong>" . stripslashes($asset_name) . "</strong>", 'error');
redirect();

View File

@@ -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 <strong>$name</strong> created");
flashAlert("Client <strong>" . stripslashes($name) . "</strong> 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 <strong>$name</strong> updated");
flashAlert("Client <strong>" . stripslashes($name) . "</strong> 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 <strong>$client_name</strong> archived", 'error');
flashAlert("Client <strong>" . stripslashes($client_name) . "</strong> 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 <strong>$client_name</strong> restored");
flashAlert("Client <strong>" . stripslashes($client_name) . "</strong> 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 <strong>$client_name</strong> deleted along with all associated data", 'error');
flashAlert("Client <strong>" . stripslashes($client_name) . "</strong> 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 <strong>$industry</strong> for <strong>$count</strong> clients");
flashAlert("Industry set to <strong>" . stripslashes($industry) . "</strong> on <strong>$count</strong> 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 <strong>$referral</strong> for <strong>$count</strong> clients");
flashAlert("Referral set to <strong>" . stripslashes($referral) . "</strong> on <strong>$count</strong> client" . ($count === 1 ? '' : 's'));
}
redirect();

View File

@@ -79,7 +79,7 @@ if (isset($_POST['add_contact'])) {
triggerCustomAction('contact_create', $contact_id);
flashAlert("Contact <strong>$name</strong> created");
flashAlert("Contact <strong>" . stripslashes($name) . "</strong> created");
redirect();
@@ -242,7 +242,7 @@ if (isset($_POST['edit_contact'])) {
triggerCustomAction('contact_update', $contact_id);
flashAlert("Contact <strong>$name</strong> updated");
flashAlert("Contact <strong>" . stripslashes($name) . "</strong> 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 <strong>$contact_note_type</strong> deleted.", 'error');
flashAlert("Note <strong>$contact_note_type</strong> 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("<b>$contact_count</b> contacts assigned to location <b>$location_name</b>");
flashAlert("<strong>$contact_count</strong> contact" . ($contact_count === 1 ? '' : 's') . " assigned to location <strong>" . stripslashes($location_name) . "</strong>");
}
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 <b>" . formatPhoneNumber($phone) . "</b> on $contact_count</b> contacts");
flashAlert("Phone number set to <strong>" . formatPhoneNumber($phone) . "</strong> on <strong>$contact_count</strong> 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 <strong>$department</strong> for <strong>$contact_count</strong> contacts");
flashAlert("Department set to <strong>" . stripslashes($department) . "</strong> on <strong>$contact_count</strong> 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 <b>$contact_count</b> contacts");
flashAlert("Roles updated on <strong>$contact_count</strong> 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 <strong>$count</strong> contact(s)");
flashAlert("Deleted <strong>$count</strong> 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 <strong>" . stripslashes($contact_name) . "</strong> 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 <strong>$contact_name</strong> has been archived", 'error');
flashAlert("Contact <strong>" . stripslashes($contact_name) . "</strong> 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 <strong>$contact_name</strong> Restored");
flashAlert("Contact <strong>" . stripslashes($contact_name) . "</strong> restored");
redirect();
@@ -928,7 +928,7 @@ if (isset($_GET['delete_contact'])) {
logAudit("Contact", "Delete", "$session_name deleted contact $contact_name", $client_id);
flashAlert("Contact <strong>$contact_name</strong> has been deleted.", 'error');
flashAlert("Contact <strong>" . stripslashes($contact_name) . "</strong> 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 <strong>$contact_name</strong> linked with asset <strong>$asset_name</strong>");
flashAlert("Contact <strong>" . stripslashes($contact_name) . "</strong> linked with asset <strong>" . stripslashes($asset_name) . "</strong>");
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 <strong>$asset_name</strong> unlinked from Contact <strong>$contact_name</strong>", 'error');
flashAlert("Asset <strong>" . stripslashes($asset_name) . "</strong> unlinked from contact <strong>" . stripslashes($contact_name) . "</strong>", '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 <strong>$contact_name</strong> linked with credential <strong>$credential_name</strong>");
flashAlert("Contact <strong>" . stripslashes($contact_name) . "</strong> linked with credential <strong>" . stripslashes($credential_name) . "</strong>");
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 <strong>$credential_name</strong> unlinked from Contact <strong>$contact_name</strong>");
flashAlert("Credential <strong>" . stripslashes($credential_name) . "</strong> unlinked from contact <strong>" . stripslashes($contact_name) . "</strong>", 'error');
redirect();

View File

@@ -18,7 +18,7 @@ if (isset($_POST['add_tag'])) {
logAudit("Tag", "Create", "$session_name created tag $name", 0, $tag_id);
flashAlert("Tag <strong>$name</strong> created");
flashAlert("Tag <strong>" . stripslashes($name) . "</strong> created");
redirect();

View File

@@ -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 <strong>" . escapeHtml(stripslashes($task_name)) . "</strong>");
flashAlert("Task <strong>" . escapeHtml(stripslashes($task_name)) . "</strong> 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 <strong>" . escapeHtml(stripslashes($task_name)) . "</strong> edited");
flashAlert("Task <strong>" . escapeHtml(stripslashes($task_name)) . "</strong> 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 <strong>$task_name</strong> edited");
flashAlert("Task <strong>" . stripslashes($task_name) . "</strong> 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 <strong>" . escapeHtml($task['task_name']) . "</strong> " . ($complete ? 'Completed' : 'marked as incomplete'), $complete ? 'success' : 'error');
flashAlert("Task <strong>" . escapeHtml($task['task_name']) . "</strong> " . ($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 <strong>" . stripslashes($task_name) . "</strong>");
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 <strong>" . stripslashes($task_name) . "</strong> 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();

View File

@@ -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 <strong>" . escapeHtml(ticketReference($row)) . "</strong> has been updated with your reply and was <strong>$ticket_reply_type</strong>");
flashAlert(($ticket_reply_type === 'Internal' ? 'Internal note added to' : 'Reply added to') . " ticket <strong>" . escapeHtml(ticketReference($row)) . "</strong>");
} 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 <strong>" . escapeHtml(ticketReference($row)) . "</strong> resolved");
redirect();
@@ -1402,7 +1402,7 @@ if (isset($_GET['close_ticket'])) {
"Hello $contact_name,<br><br>Your ticket regarding \"$subject\" has been closed. <br><br> We hope the request/issue was resolved to your satisfaction, please provide your feedback <a href=\'https://$base_url/guest/guest_view_ticket.php?ticket_id=$ticket_id&url_key=$url_key\'>here</a>. <br>If you need further assistance, please raise a new ticket using the below details. Please do not reply to this email. <br><br>Ticket: $reference<br>Subject: $subject<br>Portal: https://$base_url/client/ticket.php?id=$ticket_id<br><br>--<br>$company_name - Support<br>$from_email<br>$company_phone");
}
flashAlert("Ticket Closed, this cannot not be reopened but you may start another one");
flashAlert("Ticket <strong>" . escapeHtml(ticketReference($row)) . "</strong> 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 <strong>" . escapeHtml(ticketReference($row)) . "</strong> reopened");
redirect();

View File

@@ -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)";

View File

@@ -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.
*/

View File

@@ -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']) !== '';
<input type="password" class="form-control" data-toggle="password" name="current_password" placeholder="To change the email you sign in with" autocomplete="current-password">
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
</div>
<div class="form-text">You'll sign in with the new email from now on - your old address is told it changed.</div>
<div class="form-text">You'll sign in with the new email from now on - your old address gets a notice that it changed.</div>
</div>
</div>
<div class="col-md-6">

View File

@@ -303,7 +303,7 @@ if (!$vendor || (isset($_GET['client_id']) && $vendor_client_id !== intval($clie
</a>
<?php if ($can_delete) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_vendor=<?= $vendor_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"
data-confirm-text="<?= $vendor_name ?> goes for good. Its cases, licenses, assets and domains stay, from no vendor.">
data-confirm-text="<?= $vendor_name ?> goes for good. Its cases, licenses, assets and domains stay, with no vendor.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</a>
<?php } ?>

View File

@@ -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
</button>
<?php if ($can_delete) { ?>
<button class="dropdown-item text-danger text-bold confirm-link" type="submit" form="bulkActions" name="bulk_delete_vendors"
data-confirm-text="The vendors go for good. Their cases, licenses, assets and domains stay, from no vendor. Vendors with expenses are kept.">
data-confirm-text="The vendors go for good. Their cases, licenses, assets and domains stay, with no vendor. Vendors with expenses are kept.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</button>
<?php } ?>
@@ -423,7 +423,7 @@ $add_url = "modals/vendor/vendor_add.php?" . ($view === 'client' ? "client_id=$c
</a>
<?php if ($can_delete) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_vendor=<?= $vendor_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>"
data-confirm-text="<?= $vendor_name ?> goes for good. Its cases, licenses, assets and domains stay, from no vendor.">
data-confirm-text="<?= $vendor_name ?> goes for good. Its cases, licenses, assets and domains stay, with no vendor.">
<i class="fas fa-fw fa-trash me-2"></i>Delete
</a>
<?php } ?>

View File

@@ -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;
}

View File

@@ -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 '<span class="itflow-contact-ref">' . credentialTile($row, 'sm')
. "<a class=\"ajax-modal $class\" href=\"#\" data-modal-url=\"modals/credential/credential.php?id=$credential_id\">$name</a></span>";
}
/**
* 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(),

View File

@@ -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) {

View File

@@ -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 = '<a class="' . (projectIsOpen($row) ? 'text-body' : 'text-body-secondary') . '" href="' . $url . '"><i class="fas fa-fw fa-project-diagram text-secondary me-1"></i>' . escapeHtml($row['project_name']) . '</a>';
if ($options['reference'] ?? true) {
$html .= ' <span class="font-monospace small text-body-secondary">' . escapeHtml(projectReference($row)) . '</span>';
}
return $html;
}
/** Where it stands: archived, completed, upcoming (starts after today) or active. */
function projectState($row) {
if (!empty($row['project_archived_at'])) {