{% extends "openassessmentblock/response/oa_response.html" %}
{% load i18n %}
{% load tz %}

{% block list_item %}
    <li id="openassessment__response__{{ xblock_id }}"
        class="openassessment__steps__step step--response has--error ui-slidable__container is--initially--collapsed"
        tabindex="-1">
{% endblock %}

{% block button %}
    <button class="ui-slidable" aria-expanded="false" id="oa_response_{{ xblock_id }}" aria-controls="oa_response_{{ xblock_id }}_content">
{% endblock %}

{% block title %}
    <span class="step__status">
        <span class="step__status__label">{% trans "This step's status" %}:</span>
        <span class="step__status__value">
            <span class="icon fa fa-exclamation-triangle" aria-hidden="true"></span>
            <span class="copy">{% trans "Cancelled" %}</span>
        </span>
    </span>
{% endblock %}

{% block body %}
    <div class="ui-slidable__content" aria-labelledby="oa_response_{{ xblock_id }}" id="oa_response_{{ xblock_id }}_content">
        <div class="wrapper--step__content">

            <div class="step__message message message--incomplete">
                <h3 class="message__title">{% trans "Submission Cancelled" %}</h3>

                <div class="message__content">
                    <p>
                        {% if workflow_cancellation.cancelled_by %}
                            {% blocktrans with removed_datetime=workflow_cancellation.cancelled_at|utc|date:"N j, Y H:i e" removed_by_username=workflow_cancellation.cancelled_by %}
                                Your submission has been cancelled by {{ removed_by_username }} on {{ removed_datetime }}
                            {% endblocktrans %}
                        {% else %}
                            {% blocktrans with removed_datetime=workflow_cancellation.cancelled_at|utc|date:"N j, Y H:i e" %}
                                Your submission was cancelled on {{ removed_datetime }}
                            {% endblocktrans %}
                        {% endif %}
                    </p>
                    <p>
                        <!-- Comments: Reason for Cancellation-->
                        {% blocktrans with comments=workflow_cancellation.comments %}
                            Comments: {{ comments }}
                        {% endblocktrans %}
                    </p>
                </div>
            </div>
        </div>
    </div>

{% endblock %}
