{% extends "deliver_grant_funding/grant_base.html" %} {% from "govuk_frontend_jinja/components/summary-list/macro.html" import govukSummaryList %} {% from "govuk_frontend_jinja/components/notification-banner/macro.html" import govukNotificationBanner %} {% from "govuk_frontend_jinja/components/back-link/macro.html" import govukBackLink %} {% set type_constants = collection.type.constants %} {% set page_title = type_constants.singular | uppercase_first ~ " settings - " ~ collection.name %} {% set active_item_identifier = type_constants.active_nav %} {% set can_edit = authorisation_helper.can_edit_collection(current_user, collection.id) %} {% block beforeContent %} {{ govukBackLink({ "text": "Back", "href": url_for(type_constants.list_endpoint, grant_id=grant.id), }) }} {% endblock beforeContent %} {% block content %}
{% if delete_form %} {% set banner_html %}

Are you sure you want to delete "{{ collection.name }}"?

{{ delete_form.csrf_token }}
{{ delete_form.confirm_deletion(params={"text": "Yes, delete this " ~ type_constants.singular, "classes": "govuk-button--warning govuk-!-margin-bottom-0"}) }} Cancel
{% endset %} {{ govukNotificationBanner(params={"role": "alert", "titleText": "Important", "html": banner_html}) }} {% endif %} {{ collection.name }}

{{ type_constants.singular | uppercase_first }} settings

{% set rows = [] %} {% do rows.append({ "key": {"text": type_constants.singular | uppercase_first ~ " name"}, "value": {"text": collection.name}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.change_collection_name", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": type_constants.singular ~ " name" }] } if can_edit else {} }) %} {% do rows.append({ "key": {"text": "Requires certification"}, "value": {"text": "Yes" if collection.requires_certification else "No"}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.collection_configure_certification", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": "certification setting" }] } if can_edit else {} }) %} {% do rows.append({ "key": {"text": "Allow reopening submissions"}, "value": {"text": "Yes" if collection.allow_submission_reopening else "No"}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.collection_configure_reopening", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": "reopening submissions setting" }] } if can_edit else {} }) %} {% do rows.append({ "key": {"text": "Allow multiple submissions"}, "value": {"text": "Yes" if collection.allow_multiple_submissions else "No"}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.collection_multiple_submissions", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": "multiple submissions setting" }] } if can_edit else {} }) %} {% if collection.allow_multiple_submissions %} {% do rows.append({ "key": {"text": "How submissions are named"}, "value": {"text": "Grant policy team will provide a list of names" if collection.multiple_submissions_are_managed_by_service else "Users will create and name each submission"}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.collection_multiple_submissions_naming", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": "multiple submissions naming setting" }] } if can_edit else {} }) %} {% set submission_name_value_html %} {{ collection.submission_name_question.text if collection.submission_name_question else "Not set" }} {% if collection.multiple_submissions_are_managed_by_service %}

Contact the Platform team to set up submission names

{% endif %} {% endset %} {% do rows.append({ "key": {"text": "Question for submission name"}, "value": {"html": submission_name_value_html}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.collection_multiple_submissions_settings", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": "multiple submissions name" }] } if can_edit else {} }) %} {% if not collection.multiple_submissions_are_managed_by_service %} {% do rows.append({ "key": {"text": "Guidance for multiple submissions (optional)"}, "value": {"html": collection.submission_guidance | replace("\n", "
" | safe) if collection.submission_guidance else "Not set"}, "actions": { "items": [{ "href": url_for("deliver_grant_funding.collection_multiple_submissions_settings", grant_id=grant.id, collection_type=collection.type, collection_id=collection.id), "classes": "govuk-link--no-visited-state", "text": "Change", "visuallyHiddenText": "multiple submissions guidance" }] } if can_edit else {} }) %} {% endif %} {% endif %} {{ govukSummaryList({"rows": rows}) }} {% if can_edit and not collection.live_submissions %}

Delete {{ type_constants.singular }}

{% endif %}
{% endblock content %}