diff --git a/app/assets/javascripts/previewPane.js b/app/assets/javascripts/previewPane.js index 9c6bd50e3..e327687bf 100644 --- a/app/assets/javascripts/previewPane.js +++ b/app/assets/javascripts/previewPane.js @@ -13,7 +13,7 @@ const $paneWrapper = $('
'); const $form = $('form'); const previewType = $form.data('previewType'); - const $previewPane = $(``); + const $previewPane = $(``); function buildQueryString () { return $.map(arguments, (val, idx) => encodeURI(val[0]) + '=' + encodeURI(val[1])).join('&'); diff --git a/app/templates/components/branding-preview.html b/app/templates/components/branding-preview.html new file mode 100644 index 000000000..67d59ed79 --- /dev/null +++ b/app/templates/components/branding-preview.html @@ -0,0 +1,11 @@ +{% macro branding_preview(branding_style, endpoint) %} + +{% endmacro %} + +{% macro email_branding_preview(branding_style) %} + {{ branding_preview(branding_style, 'main.email_template') }} +{% endmacro %} + +{% macro letter_branding_preview(branding_style) %} + {{ branding_preview(branding_style, 'main.letter_template') }} +{% endmacro %} diff --git a/app/templates/views/organisations/organisation/settings/preview-email-branding.html b/app/templates/views/organisations/organisation/settings/preview-email-branding.html index 4e6186831..6b401f711 100644 --- a/app/templates/views/organisations/organisation/settings/preview-email-branding.html +++ b/app/templates/views/organisations/organisation/settings/preview-email-branding.html @@ -1,6 +1,7 @@ {% extends "org_template.html" %} {% from "components/form.html" import form_wrapper %} {% from "components/button/macro.njk" import govukButton %} +{% from "components/branding-preview.html" import email_branding_preview %} {% block org_page_title %} Preview email branding @@ -11,7 +12,7 @@Emails from {{ current_service.name }} will look like this.
- - + {{ email_branding_preview(nhs_branding_id) }}diff --git a/app/templates/views/service-settings/preview-email-branding.html b/app/templates/views/service-settings/preview-email-branding.html index d0149947d..6ce35fa1d 100644 --- a/app/templates/views/service-settings/preview-email-branding.html +++ b/app/templates/views/service-settings/preview-email-branding.html @@ -1,6 +1,7 @@ {% extends "withnav_template.html" %} {% from "components/form.html" import form_wrapper %} {% from "components/button/macro.njk" import govukButton %} +{% from "components/branding-preview.html" import email_branding_preview %} {% block service_page_title %} Preview email branding @@ -11,7 +12,7 @@