'document templates', 'title' => 'That document template is gone', 'text' => 'It may have been deleted.', 'icon' => 'fa-file-alt', 'filtered' => false, 'actions' => [['label' => 'Document Templates', 'href' => 'document_templates.php']]]); require_once "../includes/footer.php"; exit(); } $document_template_id = intval($template['document_template_id']); $name = escapeHtml($template['document_template_name']); $archived = !empty($template['document_template_archived_at']); $usage = documentTemplateUsage([$document_template_id])[$document_template_id] ?? ['count' => 0, 'clients' => 0, 'last' => null]; $content = trim((string) $template['document_template_content']) !== '' ? documentTemplateMarkBrackets(documentHtmlPurify($template['document_template_content'])) : ''; $used = documentTemplateWordsUsed($template); $fill_ins = documentTemplateFillIns($template, documentTemplateFillInRowsFor([$document_template_id])[$document_template_id]); $fill_in_url = "modals/document_template/document_template_fill_in.php?document_template_id=$document_template_id"; $images = is_dir(documentTemplateDir($document_template_id)) ? count(glob(documentTemplateDir($document_template_id) . '/*')) : 0; $csrf = $_SESSION['csrf_token']; // The documents made from it most lately $recent = []; $sql = mysqli_query($mysqli, "SELECT document_id, document_name, document_client_id, document_created_at, client_name, user_name FROM documents LEFT JOIN clients ON client_id = document_client_id LEFT JOIN users ON user_id = document_created_by AND document_created_by > 0 WHERE document_template_id = $document_template_id AND document_archived_at IS NULL ORDER BY document_created_at DESC, document_id DESC LIMIT 10"); while ($row = mysqli_fetch_assoc($sql)) { $recent[] = $row; } $edit_url = "modals/document_template/document_template_edit.php?id=$document_template_id"; $use_url = "modals/document_template/document_template_use.php?id=$document_template_id"; ?>

Archived - not offered for new documents

What it says

Nothing yet - edit it to write what each document starts with.' ?>

Used

document made from it 1 ? ', for ' . $usage['clients'] . ' clients' : '' ?> - last
No documents made from it yet - counting started with this version of ITFlow. Agents start one from Document from template in a client's Files.

Fill-ins

Asked for when a document is made from it - each answer goes in wherever its [Name] is, and one left blank stays for whoever writes it. Drag to change the order they are asked in.

Required Not in the text
Nothing to ask. Put a word in square brackets in what it says - [Firewall Model], [Review Date] - and it is asked for when a document is made from it, then filled in. Add one here to make it a date, a choice from a list or yes or no, or to make it required.

Filled in from the client

$word) { ?> []
The - the client's primary, unless another is picked when the document is made.
The client's records, as they are then
    $word) { ?>
  • []

Details

Made
' . escapeHtml($template['created_by_name']) . '
' : '' ?>
Last changed
' . escapeHtml($template['updated_by_name']) . '
' : '' ?>
Images