N°9711 - Block user from going back to the setup (#944)

This commit is contained in:
Eric Espié
2026-06-22 17:12:57 +02:00
committed by GitHub
parent 614d3586c8
commit f1af3d5c5f
8 changed files with 97 additions and 76 deletions

View File

@@ -2162,6 +2162,33 @@ JS
return $aOptionalExtensions;
}
public static function GetBackButtonInfo($sReturnApplication): array
{
$sButtonUrl = '';
$sButtonLabel = '';
if ($sReturnApplication !== '') {
switch ($sReturnApplication) {
case 'itop':
$sButtonUrl = utils::GetAbsoluteUrlModulePage('combodo-data-feature-removal', 'index.php');
$sButtonLabel = 'Back to application';
break;
case 'designer':
$sButtonUrl = utils::GetAbsoluteUrlModulePage('itsm-designer-connector', 'launch.php');
$sButtonLabel = 'Back to Designer';
break;
case 'hub':
$sButtonUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php');
$sButtonLabel = 'Back to hub';
break;
default:
break;
}
}
return [$sButtonLabel, $sButtonUrl];
}
}
/**