Files
notifications-admin/app/templates/components/email-message.html
Chris Hill-Scott 73deae9bff Preview service name when adding a new service
This commit adds a new page, which appears after a user enters the name for
their new service. It shows how the service name will appear in emails and
text messages.

This means that the new service is not created until after they have confirmed
that the name is appropriate in context.

This has also involved:
- visual changes to the ‘email template’ pattern, which wasn’t very refined
  before
- removing a bunch of words from the enter service name page, because most users
  don’t read them, and we reckon that showing a preview is a better way of
  getting them to understand what is meant by service name

Still to do:
- validating the the generated email address for a service is unique (on the
  API) side
- having the API return the generated email address, rather than determining it
  in the admin app
2016-02-19 16:38:46 +00:00

41 lines
1.1 KiB
HTML

{% macro email_message(subject, body, name=None, edit_link=None, from_name=None, from_address=None) %}
{% if name %}
<h3 class="email-message-name">
{% if edit_link %}
<a href="{{ edit_link }}">{{ name }}</a>
{% else %}
{{ name }}
{% endif %}
</h3>
{% endif %}
<div class="email-message">
{% if from_name and from_address %}
<div class="email-message-from">
<div class="grid-row">
<div class="column-one-eighth">
<span class="form-hint">From</span>
</div>
<div class="column-seven-eighths">
{{ from_name }} &lt;{{ from_address }}&gt;
</div>
</div>
</div>
{% endif %}
{% if subject %}
<div class="email-message-subject">
<div class="grid-row">
<div class="column-one-eighth">
<span class="form-hint">Subject</span>
</div>
<div class="column-seven-eighths">
{{ subject }}
</div>
</div>
</div>
{% endif %}
<div class="email-message-body">
{{ body|nl2br }}
</div>
</div>
{% endmacro %}