Add a rendered template to the preview page

This commit is contained in:
Chris Hill-Scott
2020-07-08 17:31:51 +01:00
parent 0cf3124f73
commit 846fcbb8dd
2 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
from flask import redirect, render_template, request, session, url_for
from notifications_utils.broadcast_areas import broadcast_area_libraries
from notifications_utils.template import BroadcastPreviewTemplate
from orderedset import OrderedSet
from app import current_service
@@ -111,4 +112,8 @@ def preview_broadcast_message(service_id):
selected=list(broadcast_area_libraries.get_areas(
*selected_areas
)),
template=BroadcastPreviewTemplate({
'content': 'Message here',
'template_type': 'broadcast',
})
)

View File

@@ -28,7 +28,7 @@
{% if selected %}
<p class="govuk-body">
{{ "<message here>" }}
{{ template|string }}
</p>
{% call form_wrapper() %}