mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
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
39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
{% macro textbox(
|
|
field,
|
|
hint=False,
|
|
highlight_tags=False,
|
|
autofocus=False,
|
|
help_link=None,
|
|
help_link_text=None,
|
|
width='2-3',
|
|
suffix=None
|
|
) %}
|
|
<div class="form-group{% if field.errors %} error{% endif %}" {% if autofocus %}data-module="autofocus"{% endif %}>
|
|
<label class="form-label" for="{{ field.name }}">
|
|
{{ field.label }}
|
|
{% if hint %}
|
|
<span class="form-hint">
|
|
{{ hint }}
|
|
</span>
|
|
{% endif %}
|
|
{% if field.errors %}
|
|
<span class="error-message">
|
|
{{ field.errors[0] }}
|
|
</span>
|
|
{% endif %}
|
|
</label>
|
|
{{ field(**{
|
|
'class': 'form-control form-control-{} textbox-highlight-textbox'.format(width) if highlight_tags else 'form-control form-control-{} {}'.format(width, 'textbox-right-aligned' if suffix else ''),
|
|
'data-module': 'highlight-tags' if highlight_tags else ''
|
|
}) }}
|
|
{% if suffix %}
|
|
<span>{{ suffix }}</span>
|
|
{% endif %}
|
|
{% if help_link and help_link_text %}
|
|
<p class="textbox-help-link">
|
|
<a href='{{ help_link }}'>{{ help_link_text }}</a>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|