Always show download link for PDF

This feature is useful for people to try the letter thing out and see
how it feels, maybe print one on their own printer before incurring
cost.
This commit is contained in:
Chris Hill-Scott
2018-10-30 14:27:09 +00:00
parent 3a62946ecd
commit a79dfd1d6e
3 changed files with 70 additions and 13 deletions

View File

@@ -592,7 +592,6 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_
trying_to_send_letters_in_trial_mode=all((
current_service.trial_mode,
template.template_type == 'letter',
not request.args.get('from_test'),
)),
required_recipient_columns=OrderedSet(recipients.recipient_column_headers) - optional_address_columns,
preview_row=preview_row,

View File

@@ -50,13 +50,12 @@
)}}" class='page-footer'>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
{% if not error %}
{% if template.template_type != 'letter' or not request.args.from_test %}
<button type="submit" class="button">Send 1 {{ message_count_label(1, template.template_type, suffix='') }}</button>
{% else %}
<a href="{{ url_for('main.check_messages_preview', service_id=current_service.id, template_id=template.id, upload_id=upload_id, filetype='pdf') }}" download class="button">Download as a printable PDF</a>
{% endif %}
{% endif %}
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
{% if template.template_type == 'letter' %}
<a href="{{ url_for('main.check_notification_preview', service_id=current_service.id, template_id=template.id, filetype='pdf') }}" download>Download as a printable PDF</a>
{% endif %}
</form>
</div>