mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Refactor uploads preview error banner to use a shared component
Also refactor a corresponding test to avoid asserting on the content
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Trying to send a letter that's too long" data-error-label="{{ upload_id }}">
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Trying to send a letter that's too long" data-error-label="service_id: {{ current_service.id }}">
|
||||
Your letter is too long
|
||||
</h1>
|
||||
<p>
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% if message is string %}
|
||||
<h1 class="banner-title">{{ message }}</h1>
|
||||
<h1 class="banner-title">
|
||||
{{ message }}
|
||||
</h1>
|
||||
{% else %}
|
||||
<h1 class="banner-title">{{ message.title }}</h1>
|
||||
<h1 class="banner-title" data-module="track-error" data-error-type="{{ error_code }}" data-error-label="precompiled letter validation failed for service_id: {{ current_service.id }}">
|
||||
{{ message.title }}
|
||||
</h1>
|
||||
{% if message.detail %}
|
||||
<p>
|
||||
{{ message.detail | safe }}
|
||||
|
||||
@@ -9,13 +9,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% if status == 'invalid' and error %}
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
<h1 class="banner-title">{{ error.title }}</h1>
|
||||
{% if error.detail %}
|
||||
<p>{{ error.detail | safe }}</p>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% if status == 'invalid' and message %}
|
||||
{% include "partials/check/letter-validation-failed-banner.html" %}
|
||||
{% elif current_service.trial_mode %}
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% with
|
||||
|
||||
Reference in New Issue
Block a user