Add download attribute to link

This forces the file to download, rather than open in the user’s
browser. We do this in other places where we let people download CSV and
PDF files.
This commit is contained in:
Chris Hill-Scott
2019-12-31 10:24:01 +00:00
parent 8bcfb2fcde
commit 57ca75f5bc

View File

@@ -18,7 +18,7 @@
empty_message='If you have returned letter reports they will be listed here'
) %}
{% call field() %}
<a target="_blank" class="govuk_link file-list-filename"
<a download class="govuk_link file-list-filename"
href="{{url_for('.returned_letters_report', service_id=current_service.id, reported_at=item.reported_at)}}">{{ item.reported_at | format_date_normal }}</a>
<p class="file-list-hint">
{{ item.returned_letter_count}} {{ message_count_label(item.returned_letter_count, 'letter', suffix='')}}