mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Show error banner for one off letter in trial mode
In trial mode you can’t send letters. But it’s still useful to be able to build up a letter to see how it work. Best place to put this error is before someone tries to send a letter for real.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Trying to send letters in trial mode" data-error-label="{{ upload_id }}">
|
||||
You can’t send
|
||||
{{ 'this letter' if count_of_recipients == 1 else 'these letters' }}
|
||||
</h1>
|
||||
<p>
|
||||
In <a href="{{ url_for('.using_notify') }}#trial-mode">trial mode</a> you
|
||||
can only preview how your letters will look
|
||||
</p>
|
||||
@@ -109,14 +109,15 @@
|
||||
|
||||
{% elif trying_to_send_letters_in_trial_mode %}
|
||||
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Trying to send letters in trial mode" data-error-label="{{ upload_id }}">
|
||||
You can’t send
|
||||
{{ 'this letter' if count_of_recipients == 1 else 'these letters' }}
|
||||
</h1>
|
||||
<p>
|
||||
In <a href="{{ url_for('.using_notify') }}#trial-mode">trial mode</a> you
|
||||
can only preview how your letters will look
|
||||
</p>
|
||||
<div class="bottom-gutter">
|
||||
{% with
|
||||
count_of_recipients=count_of_recipients
|
||||
%}
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% include "partials/check/trying-to-send-letters-in-trial-mode.html" %}
|
||||
{% endcall %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% elif recipients.more_rows_than_can_send %}
|
||||
|
||||
|
||||
@@ -7,7 +7,18 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% if error == 'not-allowed-to-send-to' %}
|
||||
{% if template.template_type == 'letter' and current_service.trial_mode %}
|
||||
{% set error = 'trial-mode-letters' %}
|
||||
<div class="bottom-gutter">
|
||||
{% with
|
||||
count_of_recipients=1
|
||||
%}
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% include "partials/check/trying-to-send-letters-in-trial-mode.html" %}
|
||||
{% endcall %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% elif error == 'not-allowed-to-send-to' %}
|
||||
<div class="bottom-gutter">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% with
|
||||
|
||||
Reference in New Issue
Block a user