Settings stage 2: move Tickets, Projects, Quotes, Invoices and billing and Defaults onto the settings frame with sections and live next-number previews that refuse a number already in use, validate email addresses instead of blanking them, check the ticket close time and stop its PHP warnings, warn when late fees are on but reminders are off, limit the start page to real ITFlow pages and escape it where shown, keep archived default accounts, rename the Defaults fields to their columns, and keep the reminder, billing time, expense and mileage anchors

This commit is contained in:
johnnyq
2026-10-20 11:29:58 -04:00
parent 1b0169f421
commit 928fc5f10a
20 changed files with 810 additions and 817 deletions

View File

@@ -1,40 +1,30 @@
<?php
/*
* Admin > Settings > Projects - how projects are numbered. Saved by
* edit_project_settings (admin/post/settings_project.php).
*/
require_once "includes/inc_all_admin.php";
?>
<div class="card card-dark">
<div class="card-header py-3">
<h3 class="card-title"><i class="fas fa-fw fa-project-diagram me-2"></i>Project Settings</h3>
</div>
echo settingsPageStart('project');
?>
<form action="post.php" method="post" autocomplete="off" data-settings-form>
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<div class="card itflow-settings-card">
<div class="card-body">
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<h4>Project</h4>
<?= settingsSectionStart('numbering', 'Numbering', 'Each project gets the next number, after its prefix.') ?>
<?= settingsNumberingFields('project', $config_project_prefix, $config_project_next_number) ?>
<?= settingsSectionEnd() ?>
<div class="mb-3">
<label>Project Prefix</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-barcode"></i></span>
<input type="text" class="form-control" name="config_project_prefix" placeholder="Project Prefix" maxlength="200" value="<?= escapeHtml($config_project_prefix) ?>" required>
</div>
</div>
<div class="mb-3">
<label>Next Number</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-barcode"></i></span>
<input type="number" min="0" class="form-control" name="config_project_next_number" placeholder="Next Project Number" value="<?= intval($config_project_next_number) ?>" required>
</div>
</div>
<hr>
<button type="submit" name="edit_project_settings" class="btn btn-primary text-bold"><i class="fas fa-check me-2"></i>Save</button>
</form>
<?= settingsSaveBar('edit_project_settings') ?>
</div>
</div>
</form>
<?php
require_once "../includes/footer.php";