# --
# Error.dtl - provides HTML Error screen
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: Error.dtl,v 1.32 2012/11/20 15:26:10 mh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

<div class="MainBox ARIARoleMain SpacingTopLarge">

    <div class="W33pc CenterBox SpacingBottomLarge">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Oops! An Error occurred."}</h2>
            </div>
            <div class="Content">
                <h4>
                    $Text{"Error Message"}: <span class="Error">$QData{"Message"}</span>
                </h4>
                <p class="SpacingTop">
                    $QData{"Comment"}.
                </p>

                <form action="http://bugs.otrs.org/enter_bug.cgi">

                    <textarea class="Hidden" name="comment" rows="1" cols="1"><![CDATA[
Message:
$QData{"Message"}

Comment:
$QData{"Comment"}

Traceback:
$QData{"BackendTraceback"}"
                    ]]></textarea>
                    <input type="hidden" name="bug_file_loc" value="$QEnv{"SERVER_NAME"}$QEnv{"REQUEST_URI"}"/>

                    <p class="SpacingTop">
                        $Text{"You can"}
                        <button type="submit" value="$Text{"Send a bugreport"}">$Text{"Send a bugreport"}</button>
                        $Text{"or"}
                        <a href="#" id="GoBack">$Text{"go back to the previous page"}</a>.
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
$('#GoBack').bind('click', function (Event) {
    // check if an older history entry is available
    if (history.length > 1) {
        history.back();
        return false;
    }

    // if we're in a popup window, close it
    if (window.opener !== null) {
        window.close();
        return false;
    }

    // normal window, no history: no action possible
    return false;
});
//]]></script>
<!--dtl:js_on_document_complete-->
                    </p>
                </form>

                <div id="Traceback" class="SpacingTop Notice Hidden">
                    <h4>$Text{"Error Details"}:</h4>

                </div>
            </div>
        </div>
<!-- dtl:block:ShowBackendTraceback -->
        <div class="WidgetSimple Collapsed SpacingTop">
            <div class="Header">
                <div class="WidgetAction Toggle">
                    <a href="#" title="$Text{"Expand"}"><span></span></a>
                </div>
                <h2>$Text{"Error Details"}</h2>
            </div>
            <div class="Content">
                <code>Backend $QData{"BackendTraceback"}</code>
            </div>
        </div>
<!-- dtl:block:ShowBackendTraceback -->
    </div>
</div>