{% macro digitalmarketplaceComplianceCommunicationAttachmentRow(params) %} {%- from 'govuk_frontend_jinja/components/checkboxes/macro.html' import govukCheckboxes -%} {%- 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/input-from-form/macro.html" import digitalmarketplaceInputFromForm -%} {%- from "digitalmarketplace_frontend_jinja/components/file-upload-from-form/macro.html" import digitalmarketplaceFileUploadFromForm -%} {%- from "digitalmarketplace_frontend_jinja/components/checkboxes-from-form/macro.html" import digitalmarketplaceCheckboxesFromForm -%} {% call govukFieldset({ "legend": { "html": 'Attachment {}'.format(params.index + 1), "classes": "govuk-fieldset__legend--m" }, "classes": "dm-compliance-communication__attachments-item" }) %} {{ params.attachment.hidden_tag() }}
{{ digitalmarketplaceFileUploadFromForm({ "form": params.attachment.file, "classes": "dm-compliance-communication__attachments-item-file", "hint": { "html": params.attachment.file.hint }, "attributes": { "tabindex": "-1" } if params.template }) }}
{{ govukButton({ "html": 'Remove attachment {}'.format(params.index + 1), "classes": "govuk-button--secondary dm-compliance-communication__attachments-item-remove govuk-visually-hidden", "type": "button", "attributes": { "tabindex": "-1" } }) }} {{ digitalmarketplaceCheckboxesFromForm({ "form": params.attachment.required, "fieldset": { "legend": { "classes": " " }, "classes": "dm-compliance-communication__attachments-item-required" }, "items": [ { "text": params.attachment.required.question, "value": true, "checked": params.attachment.required.data | lower == 'true', "attributes": { "tabindex": "-1" } if params.template } ] }) }}
{% endcall %} {% endmacro %}