mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Display the two new virus states for letters
Precompiled letters can now have two additional states: * pending-virus-check * virus-scan-failed Both new states should show in the notifications dashboard, and virus-scan-failed should appear as an error state, with a descriptive message. You should not be able to preview a letter in one of the two new states, so the preview link has been removed for precompiled letters in these states.
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
{% if notification.status|format_notification_status_as_url %}
|
||||
<a href="{{ notification.status|format_notification_status_as_url }}">
|
||||
{% endif %}
|
||||
{% if notification['notification_type'] != "letter" %}
|
||||
{% if notification['notification_type'] != "letter" or notification.status == 'virus-scan-failed' %}
|
||||
{{ notification.status|format_notification_status(
|
||||
notification.template.template_type
|
||||
) }}
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
field_headings_visible=False
|
||||
) %}
|
||||
{% call row_heading() %}
|
||||
<a class="file-list-filename" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id) }}">{{ item.to }}</a>
|
||||
{% if item.status in ('pending-virus-check', 'virus-scan-failed') %}
|
||||
<span class="file-list-filename">{{ item.to }}</span>
|
||||
{% else %}
|
||||
<a class="file-list-filename" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id) }}">{{ item.to }}</a>
|
||||
{% endif %}
|
||||
<p class="file-list-hint">
|
||||
{{ item.preview_of_content }}
|
||||
</p>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<dd class="api-notifications-item-data-item">{{ notification[key] }}</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if notification['notification_type'] == 'letter' %}
|
||||
{% if notification['notification_type'] == 'letter' and notification.status not in ('pending-virus-check', 'virus-scan-failed') %}
|
||||
<a href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=notification.id) }}">View letter</a>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
Reference in New Issue
Block a user