{% from "deliver_grant_funding/macros/deliver_grant_funding_collection_breadcrumb.html" import deliver_grant_funding_collection_breadcrumb %} {% from "common/partials/mhclg-test-banner.html" import mhclgInlinePageTestDataBanner %} {% from "common/macros/status.html" import submissionStatusTag, assessmentStatusTag with context %} {% from "common/macros/submissions.html" import submission_answers with context %} {% from "govuk_frontend_jinja/components/notification-banner/macro.html" import govukNotificationBanner %} {% from "govuk_frontend_jinja/components/button/macro.html" import govukButton %} {% extends "deliver_grant_funding/grant_base.html" %} {% set page_title = "Submission - " ~ helper.long_collection_name %} {% set type_constants = helper.submission.collection.type.constants %} {% set active_item_identifier = type_constants.active_nav %} {% block beforeContent %} {% if helper.is_test %} {{ mhclgInlinePageTestDataBanner("Test submission") }} {% endif %} {{ deliver_grant_funding_collection_breadcrumb(grant=grant, collection=helper.submission.collection, immediate_parent_breadcrumb_item={"text": "Submissions", "href": url_for("deliver_grant_funding.list_submissions", grant_id=grant.id, collection_type=helper.submission.collection.type, collection_id=helper.submission.collection.id, submission_mode=helper.submission.mode)}, this_page_breadcrumb_item={"text": helper.submission.grant_recipient.organisation.name if helper.submission.grant_recipient else helper.submission.created_by.email }) }} {% endblock beforeContent %} {% block content %}
{% with flashes = get_flashed_messages(category_filter=[enum.flash_message_type.SUBMISSION_REOPENED]) %} {% if flashes %} {% set submission_reopened_html %}

Submission reopened and email sent to {{ helper.submission.grant_recipient.organisation.name if helper.submission.grant_recipient else helper.submission.created_by.email }}

Email sent to {{ helper.submission.grant_recipient.organisation.name ~ " users" if helper.submission.grant_recipient else helper.submission.created_by.email }} with your reason for reopening.

{% endset %} {{ govukNotificationBanner({ "html": submission_reopened_html, "type":"success", "titleText": "Success" }) }} {% endif %} {% endwith %}
{% if delete_form %} {% set banner_html %}

Are you sure you want to reset this test submission?

{{ delete_form.csrf_token }}
{{ delete_form.confirm_deletion(params={"text": "Yes, reset this test submission", "classes": "govuk-button--warning govuk-!-margin-bottom-0"}) }} Cancel
{% endset %} {{ govukNotificationBanner(params={"role": "alert", "titleText": "Important", "classes": "", "html": banner_html}) }} {% endif %} {{ helper.submission.grant_recipient.organisation.name if helper.submission.grant_recipient else helper.submission.created_by.email }}

Submission

{% if helper.submission.is_assessed %} {{ assessmentStatusTag(helper.assessment_status) }} {% else %} {{ submissionStatusTag(helper.status, helper.submission.is_overdue) }} {% endif %}
{% if helper.can_be_reopened_by_user(current_user) %}
{{ govukButton( params={ "text": "Reopen submission", "href": url_for('deliver_grant_funding.reopen_submission', grant_id=grant.id, submission_id=helper.submission.id), "classes": "govuk-button--secondary" } ) }}
{% endif %} {{ submission_answers(helper, should_show_answers_diff=helper.is_submitted) }}

Back to submissions

{% if helper.submission.mode == enum.submission_mode.TEST %}

Manage test submission

{% endif %} {% endblock content %}