dolibarr 21.0.0-beta
errors.tpl.php
1<!-- file errors.tpl.php -->
2<?php
3/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
4 */
5// Protection to avoid direct call of template
6if (empty($context) || !is_object($context)) {
7 print "Error, template page can't be called as URL";
8 exit(1);
9}
10'@phan-var-force Context $context';
11
12print '
13 <div class="modal fade" id="webportal_errors" tabindex="-1" role="dialog" aria-labelledby="webportal_errors_title" aria-hidden="true">
14 <div class="modal-dialog modal-lg" role="document">
15 <div class="modal-content">
16 <div class="model-header bg-danger">
17 <button type="button" class="close p-1" data-dismiss="modal" aria-hidden="true">&times;</button>
18 <div class="d-flex justify-content-center">
19 <span class="display-1 text-white">Ooops</span>
20 </div>
21 </div>
22
23 <div class="modal-body m-0 py-4">
24 ';
25
26foreach ($context->errors as $err) {
27 print '<blockquote class="blockquote m-0">' . $err . '</blockquote>';
28}
29
30print '
31 </div>
32 </div>
33 </div>
34 </div>
35 <script type="text/javascript">$(function(){ $("#webportal_errors").modal(); });</script>
36';
37
38
39$context->clearErrors();
$context
@method int call_trigger(string $triggerName, User $user)
Definition logout.php:42