1<!-- file footer.tpl.php -->
4if (empty($context) || !is_object($context)) {
5 print
"Error, template page can't be called as URL";
25$context->loadEventMessages();
27if (!empty($context->eventMessages[
'mesgs'])) {
28 $htmlSuccess = $useJNotify ?
'' :
'<div class="success" role="alert">';
30 foreach ($context->eventMessages[
'mesgs'] as $mesg) {
32 $htmlSuccess .=
'<br>';
34 $htmlSuccess .= $langs->trans($mesg);
37 $htmlSuccess .= $useJNotify ?
'' :
'</div>';
47if (!empty($context->eventMessages[
'warnings'])) {
48 $htmlWarning = $useJNotify ?
'' :
'<div class="warning" role="alert">';
50 foreach ($context->eventMessages[
'warnings'] as $mesg) {
52 $htmlWarning .=
'<br>';
54 $htmlWarning .= $langs->trans($mesg);
57 $htmlWarning .= $useJNotify ?
'' :
'</div>';
59 $jsWarning .=
'jQuery.jnotify("' .
dol_escape_js($htmlWarning) .
'", "warning", true);';
63if (!empty($context->eventMessages[
'errors'])) {
64 $htmlError = $useJNotify ?
'' :
'<div class="error" role="alert">';
66 foreach ($context->eventMessages[
'errors'] as $mesg) {
70 $htmlError .= $langs->trans($mesg);
73 $htmlError .= $useJNotify ?
'' :
'</div>';
75 $jsError .=
'jQuery.jnotify("' .
dol_escape_js($htmlError) .
'", "error", true );';
78$html .= $htmlError . $htmlWarning . $htmlSuccess;
80 $jsOut = $jsSuccess . $jsWarning . $jsError;
85$context->clearEventMessages();
87if ($context->getErrors()) {
88 include __DIR__ .
'/errors.tpl.php';
91 $js =
'<script nonce="' .
getNonce() .
'">';
92 $js .=
'jQuery(document).ready(function() {';
99print
'<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.