Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion include/init/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@
}
// Update completed
elseif (Update::isUpdateCompleted()) {
$postUpdateUrl = base_path_osm().'/index.php';
$autoRedirect = (($_GET['firstuse'] ?? '') !== 'true') ? 'true' : 'false';

Update::updateCleanup();

echo '
Expand All @@ -216,7 +219,13 @@
// Mostra tutti i segni di spunta per gli aggiornamenti completati
$("#updates-list .fa-check").show();

$("#versions-details-container").after(\'<div class="mt-4"><a class="btn btn-success btn-lg btn-block shadow" href="'.base_path_osm().'"><i class="fa fa-check mr-2"></i> '.tr('Configura il gestionale').'</a></div>\');
var postUpdateUrl = '.json_encode($postUpdateUrl).';
$("#versions-details-container").after(\'<div class="mt-4"><a class="btn btn-success btn-lg btn-block shadow" href="\' + postUpdateUrl + \'"><i class="fa fa-check mr-2"></i> '.tr('Configura il gestionale').'</a></div>\');
if ('.$autoRedirect.') {
setTimeout(function() {
window.location.href = postUpdateUrl;
}, 1200);
}
</script>';

// Instructions for the first installation
Expand Down
Loading