Add Get started, a guided walk through what is left to set up after installing (cron, email, backups, billing, support, the team, starter content - each pack or picked item by item - and a first client), each step a short form of its own with Skip for now and ticked off from the settings themselves, shown to the first admin to sign in on a new install and as a Finish setting up card on the dashboard until done, skipped or dismissed, and in Admin > Get started any time; database 3.4.7 adds settings.config_getting_started (on for a new install, off for an updated one), config_getting_started_skipped and config_getting_started_opened_at; the starter content loaders take the items to load, the mail server check moves to settingsMailServerCheck() for Admin > Mail and the Email step, app.js only starts DataTables where it is loaded, and setup's finish step points at Get started

This commit is contained in:
johnnyq
2026-10-25 14:46:02 -04:00
parent 58e502ad38
commit 6d29583cef
6 changed files with 305 additions and 52 deletions

View File

@@ -389,14 +389,25 @@ if (isset($_POST['getting_started_content'])) {
$added = 0;
$summary = [];
$none_ticked = 0;
foreach ($picked as $pack) {
$pack_added = starterContentLoad($mysqli, $pack);
// The items ticked under Pick which - the whole pack when its list wasn't sent
$only = isset($_POST['picked'][$pack]) ? array_map('strval', array_filter((array) ($_POST['items'][$pack] ?? []), 'is_string')) : null;
if ($only === []) {
$none_ticked++;
continue;
}
$pack_added = starterContentLoad($mysqli, $pack, false, $only);
if ($pack_added) {
$added += $pack_added;
$summary[] = "$pack_added " . $packs[$pack]['label'];
}
}
if (!$added && $none_ticked === count($picked)) {
flashAlert('Nothing is ticked under Pick which - tick what to add, or Skip for now', 'info');
redirect(gettingStartedUrl('content'));
}
if ($added) {
logAudit("Starter Content", "Create", "$session_name loaded starter content in Get started - " . escapeSql(implode(', ', $summary)));
flashAlert('Added <strong>' . $added . '</strong> things to start from: ' . escapeHtml(implode(', ', $summary)));