{% if flaskbb_config["ATTACHMENTS_ENABLED"] and current_user.permissions.get('postattachment') %}

{% trans %}Attachments{% endtrans %}

{{ gettext( "Attach up to %(amount)s files. Each file can be up to %(size)s.", amount=flaskbb_config["ATTACHMENTS_PER_POST"], size=(flaskbb_config["ATTACHMENT_MAX_SIZE"] * 1024)|filesizeformat ) }}

{{ _("Only %(amount)s attachments per post are allowed.", amount=flaskbb_config["ATTACHMENTS_PER_POST"]) }}
{{ _("Attachments cannot be bigger than %(size)s.", size=(flaskbb_config["ATTACHMENT_MAX_SIZE"] * 1024)|filesizeformat) }}
{%- for error in form.new_attachments.errors %}
{{ error }}
{%- endfor %}
{% if edit_mode and form.delete_attachments.choices %}

{% trans %}Attached files{% endtrans %}

{% for subfield in form.delete_attachments %} {% set attachment = form.post.attachments[loop.index0] %}
{{ subfield.label.text }}
{{ subfield(class="form-check-input") }}
{% endfor %}
{% endif %}
{% endif %}