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