mirror of
https://github.com/itflow-org/itflow
synced 2026-11-24 21:37:28 +00:00
Vendor templates stage 3: add a status page and support portal to vendors and vendor templates, linked from the vendor page, quick look, vendors list and its tickets and kept in step from the template, keep the account manager line and email on templates for new vendors only, add Export and Import of vendor templates with skip, add or replace for existing names and never account numbers or PINs, refresh the starter vendor templates with support sites, status pages, portals and what support asks for plus an Update for ones added before, carry the status page and portal in license template files, the API and exports, stop making a support site with a non-http scheme a link, and database 3.3.6 adds the new vendor and vendor template columns
This commit is contained in:
31
admin/database_updates/3.3.6.php
Normal file
31
admin/database_updates/3.3.6.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 3.3.6 (from 3.3.5)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*/
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
// Where a vendor's service status is posted and where its cases are opened,
|
||||
// on vendors and the templates they are made from, and the account
|
||||
// manager's line and email on templates as vendors have them. Each column
|
||||
// is checked first, so the step can run again.
|
||||
$itflow_columns = [
|
||||
['vendors', 'vendor_status_page', "varchar(200) DEFAULT NULL AFTER `vendor_website`"],
|
||||
['vendors', 'vendor_portal', "varchar(200) DEFAULT NULL AFTER `vendor_status_page`"],
|
||||
['vendor_templates', 'vendor_template_contact_phone_country_code', "varchar(10) DEFAULT NULL AFTER `vendor_template_contact_name`"],
|
||||
['vendor_templates', 'vendor_template_contact_phone', "varchar(200) DEFAULT NULL AFTER `vendor_template_contact_phone_country_code`"],
|
||||
['vendor_templates', 'vendor_template_contact_email', "varchar(200) DEFAULT NULL AFTER `vendor_template_contact_phone`"],
|
||||
['vendor_templates', 'vendor_template_status_page', "varchar(200) DEFAULT NULL AFTER `vendor_template_website`"],
|
||||
['vendor_templates', 'vendor_template_portal', "varchar(200) DEFAULT NULL AFTER `vendor_template_status_page`"],
|
||||
];
|
||||
foreach ($itflow_columns as [$itflow_table, $itflow_column, $itflow_definition]) {
|
||||
$itflow_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = '$itflow_table' AND COLUMN_NAME = '$itflow_column' LIMIT 1");
|
||||
if (!$itflow_exists || mysqli_num_rows($itflow_exists) === 0) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `$itflow_table` ADD `$itflow_column` $itflow_definition");
|
||||
}
|
||||
}
|
||||
|
||||
unset($itflow_columns, $itflow_table, $itflow_column, $itflow_definition, $itflow_exists);
|
||||
@@ -26,6 +26,8 @@ if ($from_vendor_id) {
|
||||
'sla' => $from_vendor['vendor_sla'],
|
||||
'email' => $from_vendor['vendor_email'],
|
||||
'website' => $from_vendor['vendor_website'],
|
||||
'status_page' => $from_vendor['vendor_status_page'],
|
||||
'portal' => $from_vendor['vendor_portal'],
|
||||
'notes' => $from_vendor['vendor_notes'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
/*
|
||||
* Edit a vendor template - the fields are vendor_template_form.php, with
|
||||
* the fields ticked changed on the vendors made from it too.
|
||||
* the vendors made from it following what changes, where they still said
|
||||
* what it did (vendorTemplateFollow()).
|
||||
*/
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
|
||||
61
admin/modals/vendor_template/vendor_template_export.php
Normal file
61
admin/modals/vendor_template/vendor_template_export.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Export vendor templates to a file - every current one, or the ones picked,
|
||||
* the archived ones if asked, and their account manager if asked - to import
|
||||
* into another ITFlow (export_vendor_templates,
|
||||
* functions/vendor_template_transfer.php). Never an account number or PIN.
|
||||
*/
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT vendor_template_id, vendor_template_name, vendor_template_description, vendor_template_archived_at FROM vendor_templates
|
||||
ORDER BY vendor_template_archived_at IS NOT NULL, vendor_template_name ASC");
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-file-download me-2"></i>Export vendor templates</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<form action="/admin/post.php" method="post" autocomplete="off" data-vendor-template-export>
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
|
||||
<div class="modal-body">
|
||||
<p class="small text-secondary">A file to import into another ITFlow, or keep. Each template goes with what a vendor made from it starts with - what they are, the support line, hours, SLA, support email, site, status page and portal, and its notes. Never an account number or PIN, and who should have one stays here.</p>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Vendor templates</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
||||
<select class="form-select select2" name="vendor_template_ids[]" multiple data-placeholder="Every current one">
|
||||
<?php while ($row = mysqli_fetch_assoc($sql)) { ?>
|
||||
<option value="<?= intval($row['vendor_template_id']) ?>"<?= selectOptionVendor($row['vendor_template_name'], $row['vendor_template_archived_at'] ? 'Archived' : $row['vendor_template_description']) ?>><?= escapeHtml($row['vendor_template_name']) ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-text">Leave it empty for every current one.</div>
|
||||
</div>
|
||||
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="archived" value="1" id="exportVendorTemplatesArchived">
|
||||
<label class="form-check-label" for="exportVendorTemplatesArchived">With the archived ones too</label>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="manager" value="1" id="exportVendorTemplatesManager">
|
||||
<label class="form-check-label" for="exportVendorTemplatesManager">With the account manager</label>
|
||||
<div class="form-text mt-0">Your rep at each vendor - for a copy of your own, not one you share.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="export_vendor_templates" class="btn btn-primary text-bold"><i class="fa fa-download me-2"></i>Download</button>
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal"><i class="fa fa-times me-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
@@ -18,6 +18,7 @@ $value = function ($key) use ($vt) {
|
||||
return escapeHtml((string) ($vt[$key] ?? ''));
|
||||
};
|
||||
$phone_value = ($vt['phone'] ?? '') !== '' ? escapeHtml(formatPhoneNumber($vt['phone'], $vt['phone_country_code'] ?? '', false)) : '';
|
||||
$contact_phone_value = ($vt['contact_phone'] ?? '') !== '' ? escapeHtml(formatPhoneNumber($vt['contact_phone'], $vt['contact_phone_country_code'] ?? '', false)) : '';
|
||||
|
||||
?>
|
||||
|
||||
@@ -99,12 +100,29 @@ $phone_value = ($vt['phone'] ?? '') !== '' ? escapeHtml(formatPhoneNumber($vt['p
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label">Support site or portal</label>
|
||||
<label class="form-label">Support site</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
||||
<input type="text" class="form-control" name="website" placeholder="support.vendor.com" maxlength="200" value="<?= $value('website') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Status page</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-heartbeat"></i></span>
|
||||
<input type="text" class="form-control" name="status_page" placeholder="status.vendor.com" maxlength="200" value="<?= $value('status_page') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Support portal</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-door-open"></i></span>
|
||||
<input type="text" class="form-control" name="portal" placeholder="Where cases are opened" maxlength="200" value="<?= $value('portal') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-text mt-0">Where they post outages, and where you sign in to open a case - every client's vendor gets them.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -135,6 +153,24 @@ $phone_value = ($vt['phone'] ?? '') !== '' ? escapeHtml(formatPhoneNumber($vt['p
|
||||
<input type="text" class="form-control" name="contact_name" placeholder="Your rep there, when every client has the same one" maxlength="200" value="<?= $value('contact_name') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Their direct line</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-phone-alt"></i></span>
|
||||
<input type="hidden" name="contact_phone_country_code" value="<?= $value('contact_phone_country_code') ?>">
|
||||
<input type="tel" class="form-control" name="contact_phone" value="<?= $contact_phone_value ?>" placeholder="Phone number" maxlength="200" data-itflow-phone="contact_phone_country_code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Their email</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-at"></i></span>
|
||||
<input type="email" class="form-control" name="contact_email" placeholder="name@vendor.com" maxlength="200" value="<?= $value('contact_email') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-text mt-0">A vendor added from it starts with its account manager - a client's own rep goes on their vendor, and is never changed from here.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
54
admin/modals/vendor_template/vendor_template_import.php
Normal file
54
admin/modals/vendor_template/vendor_template_import.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Import vendor templates from a file exported by ITFlow - and what to do
|
||||
* with one already here by name (import_vendor_templates,
|
||||
* functions/vendor_template_transfer.php).
|
||||
*/
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
|
||||
ob_start();
|
||||
|
||||
?>
|
||||
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-file-upload me-2"></i>Import vendor templates</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<form action="/admin/post.php" method="post" enctype="multipart/form-data" autocomplete="off" data-vendor-template-import>
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
|
||||
<div class="modal-body">
|
||||
<p class="small text-secondary">A file exported from Admin > Vendor Templates in this or another ITFlow. Each comes in with what a vendor made from it starts with, and is required of no one until you say who should have it on its page.</p>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">File <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-file-code"></i></span>
|
||||
<input type="file" class="form-control" name="file" accept=".json,application/json" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-1">
|
||||
<label class="form-label">A vendor template already here by name</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-clone"></i></span>
|
||||
<select class="form-select select2" name="existing">
|
||||
<option value="skip" data-description="Yours stays as it is">Leave it</option>
|
||||
<option value="copy" data-description="The file's comes in under a name of its own - Dell (2)">Add the file's as well</option>
|
||||
<option value="replace" data-description="What a vendor starts with becomes the file's, and the vendors made from it that still said what it did change with it. Its account number, PIN and who should have it stay">Replace it with the file's</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="import_vendor_templates" class="btn btn-primary text-bold"><i class="fa fa-upload me-2"></i>Import</button>
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal"><i class="fa fa-times me-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
require_once '../../../includes/modal_footer.php';
|
||||
@@ -106,6 +106,28 @@ if (isset($_POST['update_starter_document_templates'])) {
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['update_starter_vendor_templates'])) {
|
||||
|
||||
// The starter vendor templates already here, brought up to this version - the vendors made from them following
|
||||
validateCSRFToken();
|
||||
|
||||
require_once 'starter_content_model.php';
|
||||
|
||||
$counts = starterUpdateVendorTemplates();
|
||||
vendorTemplatesImportLogFollowed($counts);
|
||||
$followed = vendorTemplatesImportFollowedCount($counts);
|
||||
|
||||
if ($counts['replaced']) {
|
||||
logAudit("Starter Content", "Edit", "$session_name brought {$counts['replaced']} starter vendor templates up to date" . ($followed ? " - $followed vendors changed with them" : ''));
|
||||
flashAlert("Brought <strong>{$counts['replaced']}</strong> starter vendor templates up to date" . ($followed ? " - <strong>$followed</strong> vendor" . ($followed === 1 ? '' : 's') . " made from them changed with them" : ''));
|
||||
} else {
|
||||
flashAlert("None of the starter vendor templates are here to update - add them instead", 'info');
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['update_starter_license_templates'])) {
|
||||
|
||||
// The starter license templates already here, brought up to this version
|
||||
|
||||
@@ -59,7 +59,11 @@ function starterContentPacks() {
|
||||
'vendor_templates' => [
|
||||
'label' => 'Vendor Templates',
|
||||
'icon' => 'fa-building',
|
||||
'description' => 'Vendors most clients end up with. Account numbers and support numbers are left blank.',
|
||||
'description' => "Vendors most clients end up with - each with its support site, status page and the portal cases are opened in, and what their support asks for. Phone numbers, hours and SLAs differ by region and contract, and account numbers and PINs by account, so they are yours to add.",
|
||||
'update' => [
|
||||
'button' => 'update_starter_vendor_templates',
|
||||
'confirm' => 'Bring the %d starter vendor templates you have up to date? What they are, their support site, status page, portal and notes are replaced with this version - changes you made to those are lost, and the vendors made from them that still said what they did change with them. Their support line, hours, SLA, email, account details and who should have them stay as they are.',
|
||||
],
|
||||
],
|
||||
'document_templates' => [
|
||||
'label' => 'Document Templates',
|
||||
@@ -390,27 +394,32 @@ function starterLoadProjectTemplates($mysqli, $dry_run = false) {
|
||||
|
||||
// ------------------------------
|
||||
// starterLoadVendorTemplates
|
||||
// Through the vendor template import. One whose name a template here already
|
||||
// has, archived or not, is left alone.
|
||||
// ------------------------------
|
||||
function starterLoadVendorTemplates($mysqli, $dry_run = false) {
|
||||
$existing = starterExistingNames($mysqli, 'vendor_templates', 'vendor_template_name');
|
||||
$added = 0;
|
||||
|
||||
foreach (starterContentVendorTemplates() as $vendor_template) {
|
||||
if (isset($existing[mb_strtolower($vendor_template[0])])) {
|
||||
continue;
|
||||
}
|
||||
$added++;
|
||||
if ($dry_run) {
|
||||
continue;
|
||||
}
|
||||
starterInsert($mysqli, 'vendor_templates', [
|
||||
'vendor_template_name' => $vendor_template[0],
|
||||
'vendor_template_description' => $vendor_template[1],
|
||||
'vendor_template_website' => $vendor_template[2],
|
||||
]);
|
||||
$templates = vendorTemplatesImportRead(['format' => VENDOR_TEMPLATE_FILE_FORMAT, 'version' => VENDOR_TEMPLATE_FILE_VERSION, 'templates' => starterContentVendorTemplates()]);
|
||||
if ($dry_run) {
|
||||
$existing = starterExistingNames($mysqli, 'vendor_templates', 'vendor_template_name');
|
||||
return count(array_filter($templates, function ($template) use ($existing) {
|
||||
return !isset($existing[mb_strtolower($template['name'])]);
|
||||
}));
|
||||
}
|
||||
return vendorTemplatesImport($templates, 'skip')['added'];
|
||||
}
|
||||
|
||||
return $added;
|
||||
// ------------------------------
|
||||
// starterUpdateVendorTemplates
|
||||
// The starter vendor templates already here, brought up to this library's
|
||||
// version - only what this library says: what they are, their support site,
|
||||
// status page, portal and notes. Their support line, hours, SLA, email,
|
||||
// account details and who should have them stay; the vendors made from them
|
||||
// that still said what they did change with them (vendorTemplateFollow()).
|
||||
// Returns the import's counts (vendorTemplatesImport()).
|
||||
// ------------------------------
|
||||
function starterUpdateVendorTemplates() {
|
||||
$templates = vendorTemplatesImportRead(['format' => VENDOR_TEMPLATE_FILE_FORMAT, 'version' => VENDOR_TEMPLATE_FILE_VERSION, 'templates' => starterContentVendorTemplates()]);
|
||||
return vendorTemplatesImport($templates, 'replace', true, ['description', 'website', 'status_page', 'portal', 'notes']);
|
||||
}
|
||||
|
||||
// ------------------------------
|
||||
@@ -1446,50 +1455,91 @@ function starterContentProjectTemplates() {
|
||||
|
||||
// ------------------------------
|
||||
// starterContentVendorTemplates
|
||||
// name, description, website. Phone and account fields differ per region and
|
||||
// per account, so they are left for whoever adds the vendor to a client.
|
||||
// In the vendor templates file's shape (functions/vendor_template_transfer.php):
|
||||
// name, what they are, their support site, status page and the portal cases
|
||||
// are opened in where they have one, and what support asks for. Phone
|
||||
// numbers, hours and SLAs differ by region and by contract, and account
|
||||
// numbers and PINs per account, so they are left for whoever adds the vendor
|
||||
// to a client.
|
||||
// ------------------------------
|
||||
function starterContentVendorTemplates() {
|
||||
|
||||
$vendor_templates = [
|
||||
['Microsoft', 'Cloud, productivity and operating system vendor', 'https://www.microsoft.com'],
|
||||
['Google', 'Workspace, cloud and domain services', 'https://workspace.google.com'],
|
||||
['Amazon Web Services', 'Cloud infrastructure and hosting', 'https://aws.amazon.com'],
|
||||
['Dell', 'Workstation, laptop and server hardware', 'https://www.dell.com'],
|
||||
['HP', 'Workstation, laptop and printer hardware', 'https://www.hp.com'],
|
||||
['Lenovo', 'Workstation and laptop hardware', 'https://www.lenovo.com'],
|
||||
['Supermicro', 'Server and storage hardware', 'https://www.supermicro.com'],
|
||||
['Apple', 'Workstation, laptop and mobile hardware', 'https://www.apple.com'],
|
||||
['Synology', 'Network attached storage and backup appliances', 'https://www.synology.com'],
|
||||
['QNAP', 'Network attached storage appliances', 'https://www.qnap.com'],
|
||||
['Ubiquiti', 'Networking, wireless and surveillance hardware', 'https://www.ui.com'],
|
||||
['MikroTik', 'Routing and switching hardware', 'https://mikrotik.com'],
|
||||
['Cisco', 'Networking, wireless and collaboration hardware', 'https://www.cisco.com'],
|
||||
['Fortinet', 'Firewall and network security appliances', 'https://www.fortinet.com'],
|
||||
['SonicWall', 'Firewall and network security appliances', 'https://www.sonicwall.com'],
|
||||
['APC by Schneider Electric', 'Uninterruptible power supplies and power distribution', 'https://www.apc.com'],
|
||||
['Brother', 'Printer and scanner hardware', 'https://www.brother.com'],
|
||||
['Ingram Micro', 'Hardware and software distribution', 'https://www.ingrammicro.com'],
|
||||
['TD SYNNEX', 'Hardware and software distribution', 'https://www.tdsynnex.com'],
|
||||
['Veeam', 'Backup, replication and recovery software', 'https://www.veeam.com'],
|
||||
['Acronis', 'Backup and cyber protection software', 'https://www.acronis.com'],
|
||||
['Backblaze', 'Cloud backup and object storage', 'https://www.backblaze.com'],
|
||||
['Wasabi', 'Cloud object storage', 'https://wasabi.com'],
|
||||
['Bitdefender', 'Endpoint protection and security software', 'https://www.bitdefender.com'],
|
||||
['ESET', 'Endpoint protection and security software', 'https://www.eset.com'],
|
||||
['Proofpoint', 'Email security and filtering', 'https://www.proofpoint.com'],
|
||||
['Bitwarden', 'Password management', 'https://bitwarden.com'],
|
||||
['Cloudflare', 'DNS, content delivery and security', 'https://www.cloudflare.com'],
|
||||
['Namecheap', 'Domain registration and hosting', 'https://www.namecheap.com'],
|
||||
['GoDaddy', 'Domain registration and hosting', 'https://www.godaddy.com'],
|
||||
['Adobe', 'Creative and document software', 'https://www.adobe.com'],
|
||||
['Intuit', 'Accounting and payroll software', 'https://www.intuit.com'],
|
||||
['Zoom', 'Video conferencing and collaboration', 'https://zoom.us'],
|
||||
['RingCentral', 'Hosted voice and unified communications', 'https://www.ringcentral.com'],
|
||||
['Stripe', 'Card and online payment processing', 'https://stripe.com'],
|
||||
];
|
||||
$template = function ($name, $description, $website, $status_page = '', $portal = '', $notes = '') {
|
||||
return ['name' => $name, 'description' => $description, 'website' => $website, 'status_page' => $status_page, 'portal' => $portal, 'notes' => $notes];
|
||||
};
|
||||
|
||||
return $vendor_templates;
|
||||
return [
|
||||
$template('Microsoft', 'Cloud, productivity and operating system vendor', 'support.microsoft.com', 'status.cloud.microsoft', 'admin.microsoft.com',
|
||||
"Open a service request from the Microsoft 365 admin center (Support > Help & support), signed in as an admin of the client's tenant - or from Partner Center as their partner.\n\nHave the tenant's domain and the users affected ready. Service health in the admin center shows what Microsoft already knows about; the status page is for when the admin center itself is down."),
|
||||
$template('Google', 'Workspace, cloud and domain services', 'support.google.com/a', 'www.google.com/appsstatus/dashboard', 'admin.google.com',
|
||||
"Contact support from the Admin console (Help > Contact support), signed in as a super admin of the client's Workspace.\n\nHave the primary domain and the customer ID ready - Account > Account settings in the Admin console."),
|
||||
$template('Amazon Web Services', 'Cloud infrastructure and hosting', 'aws.amazon.com/premiumsupport', 'health.aws.amazon.com/health/status', 'console.aws.amazon.com/support',
|
||||
"Open a case from the Support Center in the console of the client's AWS account. How fast they answer depends on its support plan - Basic covers account and billing questions only.\n\nHave the account ID and the region ready."),
|
||||
$template('Dell', 'Workstation, laptop and server hardware', 'www.dell.com/support', '', 'techdirect.dell.com',
|
||||
"Have the service tag ready - it decides the warranty and what support covers. Partners open cases and dispatch parts from TechDirect."),
|
||||
$template('HP', 'Workstation, laptop and printer hardware', 'support.hp.com', '', '',
|
||||
"Have the serial number and product number ready - on the label, or from HP Support Assistant."),
|
||||
$template('Lenovo', 'Workstation and laptop hardware', 'support.lenovo.com', '', '',
|
||||
"Have the machine type and serial number ready - on the label, or from Lenovo Vantage."),
|
||||
$template('Supermicro', 'Server and storage hardware', 'www.supermicro.com', '', '',
|
||||
"Have the system or motherboard serial number ready, and the BMC and BIOS versions."),
|
||||
$template('Apple', 'Workstation, laptop and mobile hardware', 'support.apple.com', 'www.apple.com/support/systemstatus', '',
|
||||
"Have the device's serial number ready. The system status page covers iCloud, the App Store and Apple's other services."),
|
||||
$template('Synology', 'Network attached storage and backup appliances', 'www.synology.com', '', 'account.synology.com',
|
||||
"Open a ticket from the Synology Account the device is registered to. Have the serial number and DSM version ready - they usually ask for the debug logs from Support Center on the device."),
|
||||
$template('QNAP', 'Network attached storage appliances', 'www.qnap.com', '', '',
|
||||
"Have the serial number and QTS or QuTS version ready."),
|
||||
$template('Ubiquiti', 'Networking, wireless and surveillance hardware', 'help.ui.com', 'status.ui.com', '',
|
||||
"Support is by chat and ticket from the help center, signed in with the UI account the devices are on. Have the device's MAC address and firmware version ready."),
|
||||
$template('MikroTik', 'Routing and switching hardware', 'help.mikrotik.com', '', '',
|
||||
"Attach a supout.rif from the device to the ticket - Make Supout.rif in WinBox, or /system sup-output - and say which RouterOS version it runs."),
|
||||
$template('Cisco', 'Networking, wireless and collaboration hardware', 'www.cisco.com', '', '',
|
||||
"A case needs a support contract on the device - have the serial number and contract number ready."),
|
||||
$template('Fortinet', 'Firewall and network security appliances', 'www.fortinet.com', '', 'support.fortinet.com',
|
||||
"Devices are registered, and tickets opened, in FortiCare. Have the serial number ready."),
|
||||
$template('SonicWall', 'Firewall and network security appliances', 'www.sonicwall.com/support', '', 'www.mysonicwall.com',
|
||||
"Appliances are registered, and cases opened, in MySonicWall. Have the serial number ready."),
|
||||
$template('APC by Schneider Electric', 'Uninterruptible power supplies and power distribution', 'www.apc.com', '', '',
|
||||
"Have the model and serial number ready, and when the batteries were last replaced."),
|
||||
$template('Brother', 'Printer and scanner hardware', 'support.brother.com', '', '',
|
||||
"Have the model and serial number ready."),
|
||||
$template('Ingram Micro', 'Hardware and software distribution', 'www.ingrammicro.com', '', '',
|
||||
"Your reseller account - quotes, orders and returns go through it and your account rep."),
|
||||
$template('TD SYNNEX', 'Hardware and software distribution', 'www.tdsynnex.com', '', '',
|
||||
"Your reseller account - quotes, orders and returns go through it and your account rep."),
|
||||
$template('Veeam', 'Backup, replication and recovery software', 'www.veeam.com/support.html', '', 'my.veeam.com',
|
||||
"Open a case in My Veeam with the license or support ID, and attach the logs the console exports for support."),
|
||||
$template('Acronis', 'Backup and cyber protection software', 'www.acronis.com', '', '',
|
||||
"Have the account or tenant name ready, and the agent version."),
|
||||
$template('Backblaze', 'Cloud backup and object storage', 'help.backblaze.com', 'status.backblaze.com', 'secure.backblaze.com',
|
||||
"Have the account's email address ready, and the bucket or computer the case is about."),
|
||||
$template('Wasabi', 'Cloud object storage', 'docs.wasabi.com', '', 'console.wasabisys.com',
|
||||
"Have the account, the bucket and its region ready."),
|
||||
$template('Bitdefender', 'Endpoint protection and security software', 'www.bitdefender.com', '', '',
|
||||
"Have the GravityZone company the client is under ready, and the endpoint's name."),
|
||||
$template('ESET', 'Endpoint protection and security software', 'www.eset.com', '', '',
|
||||
"Have the license or ESET business account ready, and the product version."),
|
||||
$template('Proofpoint', 'Email security and filtering', 'www.proofpoint.com', '', '',
|
||||
"Have the organization or domain ready, and the message ID of the email the case is about."),
|
||||
$template('Bitwarden', 'Password management', 'bitwarden.com/help', 'status.bitwarden.com', 'vault.bitwarden.com',
|
||||
"Have the organization's name and the email address of the account the case is about ready."),
|
||||
$template('Cloudflare', 'DNS, content delivery and security', 'developers.cloudflare.com', 'www.cloudflarestatus.com', 'dash.cloudflare.com',
|
||||
"Cases are opened from the dashboard of the client's Cloudflare account - what support is offered depends on its plan. Have the domain ready."),
|
||||
$template('Namecheap', 'Domain registration and hosting', 'www.namecheap.com/support', 'www.namecheap.com/status-updates', '',
|
||||
"Have the domain and the account's username ready."),
|
||||
$template('GoDaddy', 'Domain registration and hosting', 'www.godaddy.com/help', '', '',
|
||||
"Have the customer number and support PIN ready - support asks for them before it helps."),
|
||||
$template('Adobe', 'Creative and document software', 'helpx.adobe.com', 'status.adobe.com', 'adminconsole.adobe.com',
|
||||
"Admins open cases from the Admin Console (Support). Have the organization and the user's email address ready."),
|
||||
$template('Intuit', 'Accounting and payroll software', 'www.intuit.com', '', '',
|
||||
"Have the product, the company file or account, and the license number for desktop products ready."),
|
||||
$template('Zoom', 'Video conferencing and collaboration', 'support.zoom.com', 'status.zoom.us', '',
|
||||
"Have the account number ready, and the meeting ID the case is about."),
|
||||
$template('RingCentral', 'Hosted voice and unified communications', 'support.ringcentral.com', '', 'service.ringcentral.com',
|
||||
"Have the account's main number ready - admins manage it in the admin portal."),
|
||||
$template('Stripe', 'Card and online payment processing', 'support.stripe.com', 'status.stripe.com', 'dashboard.stripe.com',
|
||||
"Support is from the Dashboard of the client's Stripe account. Have the account ID (acct_...) ready, and the payment or payout the case is about."),
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -1916,7 +1966,7 @@ function starterContentLicenseTemplates() {
|
||||
|
||||
$vendors = [];
|
||||
foreach (starterContentVendorTemplates() as $vendor) {
|
||||
$vendors[$vendor[0]] = ['name' => $vendor[0], 'description' => $vendor[1], 'website' => $vendor[2]];
|
||||
$vendors[$vendor['name']] = $vendor;
|
||||
}
|
||||
$template = function ($name, $description, $type, $license_type, $term, $vendor, $product, array $notes) use ($vendors) {
|
||||
return [
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
/*
|
||||
* Vendor templates (Admin > Vendor Templates) - making, changing (the
|
||||
* vendors made from it that still said what it did changing with it),
|
||||
* copying, archiving, restoring and deleting them, and saying who should have
|
||||
* one. The work is in functions/vendor_template.php; a vendor is made from
|
||||
* copying, archiving, restoring and deleting them, saying who should have
|
||||
* one, and taking them to and from a file (functions/vendor_template_transfer.php).
|
||||
* The work is in functions/vendor_template.php; a vendor is made from
|
||||
* one by add_vendor, add_vendor_from_template and
|
||||
* add_vendor_template_to_clients, and brought in line with one, linked to one
|
||||
* or unlinked by update_vendors_from_template, link_vendors_to_template and
|
||||
@@ -152,3 +153,68 @@ if (isset($_POST['save_vendor_template_required'])) {
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['export_vendor_templates']) || isset($_GET['export_vendor_template'])) {
|
||||
|
||||
// A file of templates to import into another ITFlow - every current one, the ones picked, or one
|
||||
validateCSRFToken();
|
||||
|
||||
if (isset($_GET['export_vendor_template'])) {
|
||||
$row = vendorTemplateForRequest($_GET['export_vendor_template']);
|
||||
$export = vendorTemplatesExport([intval($row['vendor_template_id'])]);
|
||||
} else {
|
||||
$export = vendorTemplatesExport((array) ($_POST['vendor_template_ids'] ?? []), !empty($_POST['archived']), !empty($_POST['manager']));
|
||||
}
|
||||
if (!$export['templates']) {
|
||||
flashAlert('There are no vendor templates to export.', 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
$count = count($export['templates']);
|
||||
logAudit("Vendor Template", "Export", "$session_name exported $count vendor template" . ($count === 1 ? ' ' . escapeSql($export['templates'][0]['name']) : 's')
|
||||
. (!empty($_POST['manager']) ? ' with their account managers' : ''));
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
header('Content-Disposition: attachment; filename="' . vendorTemplatesExportFileName($export) . '"');
|
||||
header('Cache-Control: no-store');
|
||||
echo json_encode($export, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['import_vendor_templates'])) {
|
||||
|
||||
// Templates from a file exported by ITFlow
|
||||
validateCSRFToken();
|
||||
|
||||
$file = $_FILES['file'] ?? null;
|
||||
if ($file && in_array($file['error'], [UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE], true)) {
|
||||
flashAlert('That file is bigger than this server takes in an upload - export a few at a time.', 'error');
|
||||
redirect('vendor_templates.php');
|
||||
}
|
||||
if (!$file || $file['error'] !== UPLOAD_ERR_OK || !is_uploaded_file($file['tmp_name'])) {
|
||||
flashAlert('Pick the file to import.', 'error');
|
||||
redirect('vendor_templates.php');
|
||||
}
|
||||
if ($file['size'] > 10 * 1024 * 1024) {
|
||||
flashAlert('That file is too big to be vendor templates.', 'error');
|
||||
redirect('vendor_templates.php');
|
||||
}
|
||||
$templates = vendorTemplatesImportRead(file_get_contents($file['tmp_name']), $import_error);
|
||||
if ($templates === null) {
|
||||
flashAlert(escapeHtml($import_error), 'error');
|
||||
redirect('vendor_templates.php');
|
||||
}
|
||||
$existing = in_array($_POST['existing'] ?? '', ['skip', 'copy', 'replace'], true) ? $_POST['existing'] : 'skip';
|
||||
$counts = vendorTemplatesImport($templates, $existing);
|
||||
vendorTemplatesImportLogFollowed($counts);
|
||||
$followed = vendorTemplatesImportFollowedCount($counts);
|
||||
|
||||
logAudit("Vendor Template", "Import", "$session_name imported vendor templates from " . escapeSql(mb_substr((string) $file['name'], 0, 100)) . " - {$counts['added']} added, {$counts['replaced']} replaced, {$counts['skipped']} skipped"
|
||||
. ($followed ? ", $followed vendors changed with them" : ''));
|
||||
|
||||
flashAlert(vendorTemplatesImportSummary($counts), $counts['added'] || $counts['replaced'] ? 'success' : 'info');
|
||||
|
||||
redirect('vendor_templates.php');
|
||||
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ foreach ($starter_content_status as $pack_status) {
|
||||
Adding never overwrites or deletes anything. Anything already present under the same name is
|
||||
skipped, so a pack can be added again later to pick up entries you removed by mistake, and
|
||||
adding twice never produces duplicates. Everything added is editable and deletable
|
||||
afterwards like any other record. Ticket templates, canned responses, document templates and license templates added
|
||||
from an earlier version can be brought up to this one with Update - that one does replace what they hold.
|
||||
afterwards like any other record. Ticket templates, canned responses, vendor templates, document templates and license
|
||||
templates added from an earlier version can be brought up to this one with Update - that one does replace what they hold.
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
/*
|
||||
* One vendor template - what a vendor made from it starts with (its name,
|
||||
* what they are, the support line, hours, SLA, support email and site, any
|
||||
* account number, PIN and account manager every client shares, and its
|
||||
* notes), who made it and last changed it, and its use: the clients with a
|
||||
* what they are, the support line, hours, SLA, support email and site, its
|
||||
* status page and support portal, any account number, PIN and account
|
||||
* manager every client shares, and its notes), who made it and last changed it, and its use: the clients with a
|
||||
* vendor made from it - each with its own account number and PIN, or not yet,
|
||||
* and in step with it or saying something else (views, and bringing one or
|
||||
* several in line) - the vendors made by hand that look like it (linking
|
||||
@@ -89,17 +89,28 @@ $in_line_url = "$update_url?template_id=$vendor_template_id";
|
||||
|
||||
// What a vendor from it starts with - the ones it has
|
||||
$t = $template;
|
||||
$website = vendorWebsiteLabel($t['vendor_template_website']);
|
||||
$link = function ($site) {
|
||||
$url = vendorWebsiteUrl($site);
|
||||
return $url !== '' ? '<a href="' . escapeHtml($url) . '" target="_blank" rel="noopener noreferrer">' . escapeHtml(vendorWebsiteLabel($site)) . '<i class="fas fa-external-link-alt small ms-1"></i></a>' : '';
|
||||
};
|
||||
// The account manager every client shares - their name, with their line and email under it
|
||||
$manager = array_filter([
|
||||
escapeHtml(trim((string) $t['vendor_template_contact_name'])),
|
||||
trim((string) $t['vendor_template_contact_phone']) !== '' ? '<i class="fas fa-fw fa-phone-alt text-secondary me-1"></i>' . contactPhoneLink($t['vendor_template_contact_phone'], $t['vendor_template_contact_phone_country_code']) : '',
|
||||
trim((string) $t['vendor_template_contact_email']) !== '' ? '<i class="fas fa-fw fa-at text-secondary me-1"></i><a href="mailto:' . escapeHtml($t['vendor_template_contact_email']) . '">' . escapeHtml($t['vendor_template_contact_email']) . '</a>' : '',
|
||||
]);
|
||||
$facts = array_filter([
|
||||
'What they are' => escapeHtml((string) $t['vendor_template_description']),
|
||||
'Support line' => vendorTemplatePhoneHtml($t['vendor_template_phone'], $t['vendor_template_phone_country_code'], $t['vendor_template_extension']),
|
||||
'Support hours' => escapeHtml((string) $t['vendor_template_hours']),
|
||||
'SLA' => escapeHtml((string) $t['vendor_template_sla']),
|
||||
'Support email' => trim((string) $t['vendor_template_email']) !== '' ? '<a href="mailto:' . escapeHtml($t['vendor_template_email']) . '">' . escapeHtml($t['vendor_template_email']) . '</a>' : '',
|
||||
'Support site' => $website !== '' ? '<a href="' . escapeHtml(vendorWebsiteUrl($t['vendor_template_website'])) . '" target="_blank" rel="noopener noreferrer">' . escapeHtml($website) . '<i class="fas fa-external-link-alt small ms-1"></i></a>' : '',
|
||||
'Support site' => $link($t['vendor_template_website']),
|
||||
'Status page' => $link($t['vendor_template_status_page']),
|
||||
'Support portal' => $link($t['vendor_template_portal']),
|
||||
'Account number' => escapeHtml(trim((string) $t['vendor_template_account_number'])),
|
||||
'PIN' => vendorSecretHtml($t['vendor_template_code']),
|
||||
'Account manager' => escapeHtml(trim((string) $t['vendor_template_contact_name'])),
|
||||
'Account manager' => $manager ? '<div>' . implode('</div><div>', $manager) . '</div>' : '',
|
||||
], function ($value) {
|
||||
return trim($value) !== '';
|
||||
});
|
||||
@@ -149,6 +160,7 @@ foreach (vendorTemplateFieldLabels() as $field) {
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="<?= $required_url ?>"><i class="fas fa-fw fa-clipboard-check me-2"></i>Who should have it</a>
|
||||
<a class="dropdown-item" href="post.php?copy_vendor_template=<?= $vendor_template_id ?>&csrf_token=<?= $csrf ?>"><i class="fas fa-fw fa-copy me-2"></i>Copy</a>
|
||||
<a class="dropdown-item" href="post.php?export_vendor_template=<?= $vendor_template_id ?>&csrf_token=<?= $csrf ?>" title="A file to import into another ITFlow - without account numbers or PINs"><i class="fas fa-fw fa-file-download me-2"></i>Export</a>
|
||||
<?php if ($archived) { ?>
|
||||
<a class="dropdown-item" href="post.php?restore_vendor_template=<?= $vendor_template_id ?>&csrf_token=<?= $csrf ?>"><i class="fas fa-fw fa-redo me-2"></i>Restore</a>
|
||||
<?php } else { ?>
|
||||
@@ -188,8 +200,8 @@ foreach (vendorTemplateFieldLabels() as $field) {
|
||||
<?php } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php if (!isset($facts['Support line']) && !isset($facts['Support site']) && !isset($facts['Support email'])) { ?>
|
||||
<div class="small text-warning-emphasis mt-3"><i class="fas fa-fw fa-exclamation-triangle me-1"></i>No way to reach their support yet - give it their support line, email or site, so every client's vendor has it.</div>
|
||||
<?php if (!isset($facts['Support line']) && !isset($facts['Support site']) && !isset($facts['Support email']) && !isset($facts['Support portal'])) { ?>
|
||||
<div class="small text-warning-emphasis mt-3"><i class="fas fa-fw fa-exclamation-triangle me-1"></i>No way to reach their support yet - give it their support line, email, site or portal, so every client's vendor has it.</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* step with it (the Required and Out of step tabs). Each opens its page
|
||||
* (vendor_template.php). A template can be added to several clients at once,
|
||||
* changed, copied as the start of another, archived - not offered for new
|
||||
* vendors, while the vendors made from it stay - or deleted. The work is in
|
||||
* vendors, while the vendors made from it stay - or deleted, and they go to
|
||||
* and from a file (Export and Import). The work is in
|
||||
* functions/vendor_template.php; the handlers are
|
||||
* admin/post/vendor_template.php.
|
||||
*/
|
||||
@@ -60,12 +61,13 @@ if (!isset($sortable_columns[$sort])) {
|
||||
|
||||
$phone_search = preg_replace('/[^0-9]/', '', (string) ($_GET['q'] ?? ''));
|
||||
$search = "(vendor_template_name LIKE '%$q%' OR vendor_template_description LIKE '%$q%' OR vendor_template_website LIKE '%$q%' OR vendor_template_email LIKE '%$q%'
|
||||
OR vendor_template_status_page LIKE '%$q%' OR vendor_template_portal LIKE '%$q%' OR vendor_template_contact_email LIKE '%$q%'
|
||||
OR vendor_template_hours LIKE '%$q%' OR vendor_template_sla LIKE '%$q%' OR vendor_template_contact_name LIKE '%$q%' OR vendor_template_account_number LIKE '%$q%'
|
||||
OR vendor_template_notes LIKE '%$q%'" . ($phone_search !== '' ? " OR vendor_template_phone LIKE '%$phone_search%'" : '') . ")";
|
||||
|
||||
// Its use is the current vendors made from it for current clients - as vendorTemplateUsage() counts them
|
||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS vendor_templates.vendor_template_id, vendor_template_name, vendor_template_description, vendor_template_phone_country_code,
|
||||
vendor_template_phone, vendor_template_extension, vendor_template_email, vendor_template_website, vendor_template_hours, vendor_template_sla,
|
||||
vendor_template_phone, vendor_template_extension, vendor_template_email, vendor_template_website, vendor_template_status_page, vendor_template_hours, vendor_template_sla,
|
||||
vendor_template_created_at, vendor_template_updated_at, vendor_template_archived_at, vendor_template_required,
|
||||
COALESCE(vendor_template_updated_at, vendor_template_created_at) AS changed_at, COALESCE(updater.user_name, creator.user_name) AS changed_by,
|
||||
COALESCE(used.used_count, 0) AS used_count, used.last_used
|
||||
@@ -112,6 +114,8 @@ $pill_url = function ($show) {
|
||||
|
||||
$add_url = 'modals/vendor_template/vendor_template_add.php';
|
||||
$clients_url = '/agent/modals/vendor/vendor_template_clients.php';
|
||||
$import_url = 'modals/vendor_template/vendor_template_import.php';
|
||||
$export_url = 'modals/vendor_template/vendor_template_export.php';
|
||||
$csrf = $_SESSION['csrf_token'];
|
||||
|
||||
?>
|
||||
@@ -128,6 +132,13 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<i class="fas fa-fw fa-users text-secondary me-2"></i>Add one to clients
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="<?= $import_url ?>">
|
||||
<i class="fas fa-fw fa-file-upload text-secondary me-2"></i>Import
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="<?= $export_url ?>">
|
||||
<i class="fas fa-fw fa-file-download text-secondary me-2"></i>Export
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="starter_content.php">
|
||||
<i class="fas fa-fw fa-seedling text-secondary me-2"></i>Starter vendor templates
|
||||
</a>
|
||||
@@ -141,7 +152,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<div class="row g-2 align-items-center">
|
||||
<div class="col-lg-5 col-md-6">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(escapeHtml($q)); } ?>" placeholder="Search vendor templates..." title="Name, what they are, support line, email, site, hours, SLA, account manager or notes">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(escapeHtml($q)); } ?>" placeholder="Search vendor templates..." title="Name, what they are, support line, email, site, status page, portal, hours, SLA, account manager or notes">
|
||||
<button class="btn btn-dark" title="Search"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -179,6 +190,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
$page_url = "vendor_template.php?vendor_template_id=$template_id";
|
||||
$phone = vendorTemplatePhoneHtml($row['vendor_template_phone'], $row['vendor_template_phone_country_code'], $row['vendor_template_extension']);
|
||||
$website = vendorWebsiteLabel($row['vendor_template_website']);
|
||||
$status_url = vendorWebsiteUrl($row['vendor_template_status_page']);
|
||||
// How to reach their support
|
||||
$support = array_filter([
|
||||
$phone !== '' ? '<i class="fas fa-fw fa-phone text-secondary me-1"></i>' . $phone : '',
|
||||
@@ -195,10 +207,11 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<?php if ($summary !== '') { ?>
|
||||
<div class="small text-body-secondary"><?= escapeHtml($summary) ?></div>
|
||||
<?php } ?>
|
||||
<?php if ($website !== '' || trim((string) $row['vendor_template_email']) !== '') { ?>
|
||||
<?php if ($website !== '' || trim((string) $row['vendor_template_email']) !== '' || $status_url !== '') { ?>
|
||||
<div class="small text-body-secondary d-flex flex-wrap column-gap-3">
|
||||
<?php if ($website !== '') { ?><a class="text-reset text-nowrap" href="<?= escapeHtml(vendorWebsiteUrl($row['vendor_template_website'])) ?>" target="_blank" rel="noopener noreferrer"><i class="fas fa-fw fa-globe me-1"></i><?= escapeHtml($website) ?></a><?php } ?>
|
||||
<?php if (trim((string) $row['vendor_template_email']) !== '') { ?><span class="text-nowrap"><i class="fas fa-fw fa-envelope me-1"></i><?= escapeHtml($row['vendor_template_email']) ?></span><?php } ?>
|
||||
<?php if ($status_url !== '') { ?><a class="text-reset text-nowrap" href="<?= escapeHtml($status_url) ?>" target="_blank" rel="noopener noreferrer" title="<?= escapeHtml(vendorWebsiteLabel($row['vendor_template_status_page'])) ?>" data-template-status-page><i class="fas fa-fw fa-heartbeat me-1"></i>Status</a><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (isset($coverage[$template_id]) || (!$row['vendor_template_archived_at'] && isset($out_of_step[$template_id]))) { ?>
|
||||
@@ -264,6 +277,9 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<a class="dropdown-item" href="post.php?copy_vendor_template=<?= $template_id ?>&csrf_token=<?= $csrf ?>" title="A new template starting from this one">
|
||||
<i class="fas fa-fw fa-copy text-secondary me-2"></i>Copy
|
||||
</a>
|
||||
<a class="dropdown-item" href="post.php?export_vendor_template=<?= $template_id ?>&csrf_token=<?= $csrf ?>" title="A file to import into another ITFlow - without account numbers or PINs">
|
||||
<i class="fas fa-fw fa-file-download text-secondary me-2"></i>Export
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php if ($row['vendor_template_archived_at']) { ?>
|
||||
<a class="dropdown-item" href="post.php?restore_vendor_template=<?= $template_id ?>&csrf_token=<?= $csrf ?>">
|
||||
@@ -296,7 +312,8 @@ $csrf = $_SESSION['csrf_token'];
|
||||
'view' => ['required' => ['title' => 'No required templates', 'text' => 'Set one up from its page - <strong>Who should have it</strong> - to see which clients are missing a vendor from it.'],
|
||||
'out' => ['title' => 'Every vendor is in step', 'text' => 'Every client\'s vendor made from a template says what the template says.']][$show] ?? null,
|
||||
'text' => 'A vendor your clients use again and again - an ISP, a hardware maker, the software they run - set up once with its support line, hours and site, ready to add to any client. Agents start one from <strong>New Vendor</strong> on a client\'s Vendors.',
|
||||
'actions' => [['label' => 'New Vendor Template', 'modal' => $add_url, 'size' => 'lg'], ['label' => 'Starter vendor templates', 'href' => 'starter_content.php', 'icon' => 'fa-seedling']],
|
||||
'actions' => [['label' => 'New Vendor Template', 'modal' => $add_url, 'size' => 'lg'], ['label' => 'Import', 'modal' => $import_url, 'icon' => 'fa-file-upload'],
|
||||
['label' => 'Starter vendor templates', 'href' => 'starter_content.php', 'icon' => 'fa-seedling']],
|
||||
];
|
||||
require_once "../includes/filter_footer.php";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user