mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Use model for template previews
This commit is contained in:
@@ -292,8 +292,8 @@ def get_template(
|
|||||||
if 'email' == template['template_type']:
|
if 'email' == template['template_type']:
|
||||||
return EmailPreviewTemplate(
|
return EmailPreviewTemplate(
|
||||||
template,
|
template,
|
||||||
from_name=service['name'],
|
from_name=service.name,
|
||||||
from_address='{}@notifications.service.gov.uk'.format(service['email_from']),
|
from_address='{}@notifications.service.gov.uk'.format(service.email_from),
|
||||||
expanded=expand_emails,
|
expanded=expand_emails,
|
||||||
show_recipient=show_recipient,
|
show_recipient=show_recipient,
|
||||||
redact_missing_personalisation=redact_missing_personalisation,
|
redact_missing_personalisation=redact_missing_personalisation,
|
||||||
@@ -302,8 +302,8 @@ def get_template(
|
|||||||
if 'sms' == template['template_type']:
|
if 'sms' == template['template_type']:
|
||||||
return SMSPreviewTemplate(
|
return SMSPreviewTemplate(
|
||||||
template,
|
template,
|
||||||
prefix=service['name'],
|
prefix=service.name,
|
||||||
show_prefix=service['prefix_sms'],
|
show_prefix=service.prefix_sms,
|
||||||
sender=sms_sender,
|
sender=sms_sender,
|
||||||
show_sender=bool(sms_sender),
|
show_sender=bool(sms_sender),
|
||||||
show_recipient=show_recipient,
|
show_recipient=show_recipient,
|
||||||
|
|||||||
Reference in New Issue
Block a user