{% macro digitalmarketplaceComplianceCommunicationAttachments(params) %} {%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%} {%- from "govuk_frontend_jinja/components/fieldset/macro.html" import govukFieldset -%} {%- from "digitalmarketplace_frontend_jinja/components/compliance-communication-attachment-row/macro.html" import digitalmarketplaceComplianceCommunicationAttachmentRow -%} {% call govukFieldset({ "legend": { "text": "Add an attachment", "classes": "govuk-fieldset__legend--m" }, "attributes": { "data-module": "dm-compliance-communication__attachments" } }) %}

You can add up to 3 attachments

{{ digitalmarketplaceComplianceCommunicationAttachmentRow({ "form": { "attachment_name_99": { "name": "attachment_name_99", "question": params.form.attachment_name_0.question, "hint": params.form.attachment_name_0.hint }, "attachment_file_99": { "name": "attachment_file_99", "question": params.form.attachment_file_0.question, "hint": params.form.attachment_file_0.hint }, "attachment_required_99": { "name": "attachment_required_99", "question": params.form.attachment_required_0.question, "data": None } }, "index": 99, "template": True }) }}
{% for index in range(3) %} {{ digitalmarketplaceComplianceCommunicationAttachmentRow({ "form": params.form, "index": index }) }} {% endfor %}
{{ govukButton({ "html": 'Add attachment (0 remaining)', "classes": "govuk-button--secondary dm-compliance-communication__attachments-add govuk-visually-hidden", "type": "button", "attributes": { "tabindex": "-1" } }) }} {% endcall %} {% endmacro %}