diff --git a/modules/Reports/NewReport0.php b/modules/Reports/NewReport0.php
index 9ee2dfa2c9..3074f8855e 100644
--- a/modules/Reports/NewReport0.php
+++ b/modules/Reports/NewReport0.php
@@ -49,22 +49,10 @@
}
}
if (!vtlib_isModuleActive($oRep->primodule)) {
- echo "
";
+ $list_report_form->assign('APMSG_LOADLDS', 1);
+ $list_report_form->assign('ERROR_MESSAGE_CLASS', 'cb-alert-warning');
+ $list_report_form->assign('ERROR_MESSAGE', $mod_strings['LBL_NO_ACCESS'].' : '.getTranslatedString($oRep->primodule, $oRep->primodule));
+ $list_report_form->display('applicationmessage.tpl');
die();
}
$list_report_form->assign('RELATEDMODULES', getReportRelatedModules($oRep->primodule, $oRep));
@@ -108,22 +96,10 @@
}
if (!empty($_REQUEST['reportmodule'])) {
if (!vtlib_isModuleActive($_REQUEST['reportmodule']) || isPermitted($_REQUEST['reportmodule'], 'index')!= 'yes') {
- echo "";
+ $list_report_form->assign('APMSG_LOADLDS', 1);
+ $list_report_form->assign('ERROR_MESSAGE_CLASS', 'cb-alert-warning');
+ $list_report_form->assign('ERROR_MESSAGE', $mod_strings['LBL_NO_ACCESS'].' : '.getTranslatedString($_REQUEST['reportmodule'], $_REQUEST['reportmodule']));
+ $list_report_form->display('applicationmessage.tpl');
die();
}
$list_report_form->assign('RELATEDMODULES', getReportRelatedModules($_REQUEST['reportmodule'], $repObj));