change letter previews to be in the no_cookies blueprint

this blueprint should be applied to every endpoint that is loaded async
(as in via a src tag on an img, iframe, etc)
This commit is contained in:
Leo Hemsted
2019-11-29 11:40:49 +00:00
parent 72acc4ebdc
commit 3be9150dcf
9 changed files with 66 additions and 61 deletions

View File

@@ -47,7 +47,7 @@
{% if (template.template_type != 'letter' or not request.args.from_test) and not letter_too_long %}
<button type="submit" class="button">Send {{ count_of_recipients|format_thousands }} {{ message_count_label(count_of_recipients, 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 PDF</a>
<a href="{{ url_for('no_cookie.check_messages_preview', service_id=current_service.id, template_id=template.id, upload_id=upload_id, filetype='pdf') }}" download class="button">Download as a PDF</a>
{% endif %}
</form>
</div>

View File

@@ -79,7 +79,7 @@
<button type="submit" class="button">Send 1 {{ message_count_label(1, template.template_type, suffix='') }}</button>
{% endif %}
{% 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 class="page-footer-right-aligned-link{% if error %}-without-button{% endif %}">Download as a PDF</a>
<a href="{{ url_for('no_cookie.check_notification_preview', service_id=current_service.id, template_id=template.id, filetype='pdf') }}" download class="page-footer-right-aligned-link{% if error %}-without-button{% endif %}">Download as a PDF</a>
{% endif %}
</form>
</div>