1<!-- file footer.tpl.php -->
7 print
"Error, template page can't be called as URL";
10'@phan-var-force Context $context';
30if (!empty(
$context->eventMessages[
'mesgs'])) {
31 $htmlSuccess = $useJNotify ?
'' :
'<div class="success" role="alert">';
33 foreach (
$context->eventMessages[
'mesgs'] as $mesg) {
35 $htmlSuccess .=
'<br>';
37 $htmlSuccess .= $langs->trans($mesg);
40 $htmlSuccess .= $useJNotify ?
'' :
'</div>';
50if (!empty(
$context->eventMessages[
'warnings'])) {
51 $htmlWarning = $useJNotify ?
'' :
'<div class="warning" role="alert">';
53 foreach (
$context->eventMessages[
'warnings'] as $mesg) {
55 $htmlWarning .=
'<br>';
57 $htmlWarning .= $langs->trans($mesg);
60 $htmlWarning .= $useJNotify ?
'' :
'</div>';
62 $jsWarning .=
'jQuery.jnotify("' .
dol_escape_js($htmlWarning) .
'", "warning", true);';
66if (!empty(
$context->eventMessages[
'errors'])) {
67 $htmlError = $useJNotify ?
'' :
'<div class="error" role="alert">';
69 foreach (
$context->eventMessages[
'errors'] as $mesg) {
73 $htmlError .= $langs->trans($mesg);
76 $htmlError .= $useJNotify ?
'' :
'</div>';
78 $jsError .=
'jQuery.jnotify("' .
dol_escape_js($htmlError) .
'", "error", true );';
81$html .= $htmlError . $htmlWarning . $htmlSuccess;
83 $jsOut = $jsSuccess . $jsWarning . $jsError;
91 include __DIR__ .
'/errors.tpl.php';
94 $js =
'<script nonce="' .
getNonce() .
'">';
95 $js .=
'jQuery(document).ready(function() {';
102print
'<script src="'.$context->getControllerUrl().
'/js/theme.js"></script>';
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into javascript code.
getNonce()
Return a random string to be used as a nonce value for js.
$context
@method int call_trigger(string $triggerName, User $user)