Add preview step to branding selection flow

Gives platform admins a chance to preview the
combination of brand type and custom brand
(coloured banner and logo) set for service before
saving.
This commit is contained in:
Tom Byers
2018-08-02 14:46:01 +01:00
parent 7b955ffad2
commit a2a02a5185
4 changed files with 71 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
{% extends "views/platform-admin/_base_template.html" %}
{% block service_page_title %}
Preview email branding
{% endblock %}
{% block platform_admin_content %}
<h1 class="heading-large">Preview email branding</h1>
<div class="grid-row">
<div class="column-full">
<iframe src="{{ url_for('main.email_template', branding_type=form.branding_type.data, branding_style=form.branding_style.data) }}" class="email-branding-preview"></iframe>
<form method="post" action="{{ action }}">
<div class="form-group">
{{ form.hidden_tag() }}
<div class="page-footer">
<button type="submit" class="button">Save</button>
<a class="page-footer-back-link" href="{{ url_for('main.service_settings', service_id=service_id) }}">Back to service settings</a>
</div>
</div>
</form>
</div>
</div>
{% endblock %}

View File

@@ -9,18 +9,24 @@
{% block maincolumn_content %}
<h1 class="heading-large">Set email branding</h1>
<div class="grid-row">
<div class="column-three-quarters">
<form method="post">
<form method="post">
<div class="grid-row">
<div class="column-one-half">
{{ radios(form.branding_type) }}
</div>
<div class="column-one-half">
{{ branding_radios(form.branding_style, branding_dict=branding_dict) }}
</div>
</div>
<div class="grid-row">
<div class="column-three-quarters">
{{ page_footer(
'Save',
'Preview',
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
</form>
</div>
</div>
</div>
</form>
{% endblock %}