mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Make it possible to preview a broadcast template
At the moment this won’t look like much, but it will let us do an end-to-end run of adding a broadcast template. At the moment all you can do with a broadcast template is edit it, so there’s no ‘Send’ link on the page.
This commit is contained in:
@@ -37,6 +37,7 @@ from notifications_utils.postal_address import PostalAddress
|
||||
from notifications_utils.recipients import RecipientCSV
|
||||
from notifications_utils.take import Take
|
||||
from notifications_utils.template import (
|
||||
BroadcastPreviewTemplate,
|
||||
EmailPreviewTemplate,
|
||||
LetterImageTemplate,
|
||||
LetterPreviewTemplate,
|
||||
@@ -437,6 +438,10 @@ def get_template(
|
||||
admin_base_url=current_app.config['ADMIN_BASE_URL'],
|
||||
redact_missing_personalisation=redact_missing_personalisation,
|
||||
)
|
||||
if 'broadcast' == template['template_type']:
|
||||
return BroadcastPreviewTemplate(
|
||||
template,
|
||||
)
|
||||
|
||||
|
||||
def get_current_financial_year():
|
||||
|
||||
Reference in New Issue
Block a user