Skip to content

Commit

Permalink
feat(annual error mesage email): refactor page a bit, add case for re…
Browse files Browse the repository at this point in the history
…maining = 0
  • Loading branch information
andrewleith committed Dec 4, 2024
1 parent 2d5e949 commit 80e3cd3
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions app/templates/partials/check/too-many-email-messages-annual.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{% from "components/links.html" import content_link %}

<p>
<p data-testid="exceeds-annual">
{%- if current_service.trial_mode %}
{{ _("Your service is in trial mode. To send more messages, <a href='{}'>request to go live</a>").format(url_for('main.request_to_go_live', service_id=current_service.id)) }}
{% else %}
<p data-testid="exceeds-annual">{{ _('<strong>{}</strong> can only send <strong>{}</strong> more email messages until annual limit resets'.format(current_service.name, recipients_remaining_messages)) }}</p>
<p>
{{ _('To send some of these messages now, edit the spreadsheet to <strong>{}</strong> recipients maximum. '.format(recipients_remaining_messages)) }}
{{ _('To send to recipients you removed, wait until <strong>April 1, {}</strong> or contact them some other way.'.format(now().year)) }}
</p>
{% if recipients_remaining_messages > 0 %}
<p>{{ _('<strong>{}</strong> can only send <strong>{}</strong> more email messages until annual limit resets'.format(current_service.name, recipients_remaining_messages)) }}</p>
<p>
{{ _('To send some of these messages now, edit the spreadsheet to <strong>{}</strong> recipients maximum. '.format(recipients_remaining_messages)) }}
{{ _('To send to recipients you removed, wait until <strong>April 1, {}</strong> or contact them some other way.'.format(now().year)) }}
</p>
{% else %}
<p>{{ _('<strong>{}</strong> cannot send any more email messages until <strong>April 1, {}</strong>'.format(current_service.name, now().year)) }}</p>
<p>{{ _('For more information, visit the <a href={}>usage report for {}</a>.'.format(url_for('.monthly', service_id=current_service.id), current_service.name)) }}</p>
{% endif %}
{%- endif -%}
</p>

0 comments on commit 80e3cd3

Please sign in to comment.