Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
error.twig 2.41 KiB

{% set pagetitle = dictTitle | trans %}
{% extends "base.twig" %}

{% block postload %}
    <script type="text/javascript">
        new Clipboard('.clipboard-btn');
    </script>
{% endblock %}

{% block content %}
    <h2>{{ dictTitle | trans }}</h2>
    {{ dictDescr | trans(parameters) }}

    {# include optional information for error
       Some exceptions set 'includeTemplate' to the name of a template to include.
       e.g. "core:no_state.tpl.php". The format is "<module>:<template name>"
    #}
    {% if includeTemplate %}
        {% include(includeTemplate) %}
    {% endif %}

    {# TODO: Update class #}
    <div class="metadatabox">
        <p>{{ '{errors:report_trackid}' | trans }}</p>
        {# TODO: Update class #}
        <div class="">
            <pre id="trackid">{{ error.trackId }}</pre>
            <button data-clipboard-target="#trackid" id="btntrackid" class="pure-button left clipboard-btn">
                <i class="fa fa-copy"></i>
            </button>
        </div>
    </div>

    {# print out exception only if the exception is available #}
    {% if showerrors %}
        <h2>{{'{errors:debuginfo_header}' | trans}}</h2>
        <p>{{'{errors:debuginfo_text}' | trans}}</p>

        {# TODO: Update class #}
        <div class="metadatabox">
            <pre>{{ error.exceptionMsg }}</pre>
            <pre>{{ error.exceptionTrace }}</pre>
        </div>
    {% endif %}

    {# Add error report submit section if we have a valid technical contact. 'errorreportaddress' will only be set if
       the technical contact email address has been set. #}
    {% if errorReportAddress %}
        <h2>{{ '{errors:report_header}' | trans }}</h2>
        <form action="{{ errorReportAddress }}" method="post">
            <p>{{ '{errors:report_text}' | trans }}</p>
            <p>{{ '{errors:report_email}' | trans }}
                <input type="email" name="email" value="{{ email }}" />
            </p>
            <p>
                <textarea class="metadatabox" name="text" rows="6" cols="50">{{ '{errors:report_explain}' | trans }}</textarea>
            </p>
        </form>
        <p>
            <input type="hidden" name="reportId" value="{{ error.reportId }}" />
            <button type="submit" name="send" class="btn">{{ '{errors:report_submit}' | trans }}</button>
        </p>
    {% endif %}

    <h2>{{ '{errors:howto_header}' | trans }}</h2>
    <p>{{ '{errors:howto_text}' | trans }}</p>

{% endblock %}