Merge pull request #13490 from colemanw/Fix
[civicrm-core.git] / templates / CRM / common / fatal.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
6b83d5bd 5 | Copyright CiviCRM LLC (c) 2004-2019 |
6a488035
TO
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25*}
26{* error.tpl: Display page for fatal errors. Provides complete HTML doc.*}
27{if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
28<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
29<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
30
31<head>
84509850 32 <title>{$pageTitle|escape}</title>
6a488035
TO
33 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
34 <base href="{$config->resourceBase}" />
a67299c6
CW
35 <style type="text/css" media="screen">
36 @import url({$config->resourceBase}css/civicrm.css);
e588e904 37 @import url({$config->resourceBase}css/crm-i.css);
8777ffd1 38 @import url({$config->resourceBase}bower_components/font-awesome/css/font-awesome.min.css);
a67299c6 39 </style>
6a488035
TO
40</head>
41<body>
42<div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
43{else}
44<div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
a67299c6
CW
45 <style type="text/css" media="screen">
46 @import url({$config->resourceBase}css/civicrm.css);
e588e904 47 @import url({$config->resourceBase}css/crm-i.css);
8777ffd1 48 @import url({$config->resourceBase}bower_components/font-awesome/css/font-awesome.min.css);
a67299c6 49 </style>
6a488035 50{/if}
bc8360e1 51<div class="messages status no-popup"> <i class="crm-i fa-exclamation-triangle crm-i-red"></i>
4de0cf12 52 <span class="status-fatal">{ts}Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.{/ts}</span>
84509850 53 <div class="crm-section crm-error-message">{$message|escape}</div>
6a488035
TO
54 {if $error.message && $message != $error.message}
55 <hr style="solid 1px" />
84509850 56 <div class="crm-section crm-error-message">{$error.message|escape}</div>
6a488035
TO
57 {/if}
58 {if ($code OR $mysql_code OR $errorDetails) AND $config->debug}
a33c6d84 59 <div class="crm-accordion-wrapper collapsed crm-fatal-error-details-block">
60 <div class="crm-accordion-header" onclick="toggle(this);";>
6a488035
TO
61 {ts}Error Details{/ts}
62 </div><!-- /.crm-accordion-header -->
63 <div class="crm-accordion-body">
64 {if $code}
84509850 65 <div class="crm-section">{ts}Error Code:{/ts} {$code|purify}</div>
6a488035
TO
66 {/if}
67 {if $mysql_code}
84509850 68 <div class="crm-section">{ts}Database Error Code:{/ts} {$mysql_code|purify}</div>
6a488035
TO
69 {/if}
70 {if $errorDetails}
84509850 71 <div class="crm-section">{ts}Additional Details:{/ts} {$errorDetails|purify}</div>
6a488035
TO
72 {/if}
73 </div><!-- /.crm-accordion-body -->
74 </div><!-- /.crm-accordion-wrapper -->
75 {/if}
76 <p><a href="{$config->userFrameworkBaseURL}" title="{ts}Main Menu{/ts}">{ts}Return to home page.{/ts}</a></p>
77</div>
78</div> {* end crm-container div *}
79{literal}
80<script language="JavaScript">
81function toggle( element ) {
a33c6d84 82 var parent = element.parentNode;
83 var className = parent.className;
6a488035 84 if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') {
a33c6d84 85 parent.className = 'crm-accordion-wrapper crm-fatal-error-details-block';
6a488035 86 } else {
a33c6d84 87 parent.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block';
6a488035
TO
88 }
89}
90</script>
91{/literal}
92{if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
93</body>
94</html>
95{/if}