Merge pull request #3170 from alphagov/show-users-why-their-precompiled-letter-failed-validation

Show users why their precompiled letter failed validation
This commit is contained in:
Pea (Malgorzata Tyczynska)
2019-11-07 11:23:30 +00:00
committed by GitHub
19 changed files with 134 additions and 86 deletions

View File

@@ -26,7 +26,7 @@
) }}
{% if letter_too_long %}
{% call banner_wrapper(type='dangerous', id='letter-too-long') %}
{% call banner_wrapper(type='dangerous') %}
{% include "partials/check/letter-too-long.html" %}
{% endcall %}
{% endif %}

View File

@@ -14,10 +14,10 @@
<div class="grid-row">
<div class="column-whole">
{% if result %}
{% if passed_validation %}
{{ banner(message, with_tick=True) }}
{% elif message %}
{{ banner(message, 'dangerous')}}
{% include "partials/check/letter-validation-failed-banner.html" %}
{% endif %}
<h1 class="heading-large">Letter validation preview</h1>

View File

@@ -53,7 +53,7 @@
{% set error = 'letter-too-long' %}
{{ govuk_back_link(back_link) }}
<div class="bottom-gutter">
{% call banner_wrapper(type='dangerous', id='letter-too-long') %}
{% call banner_wrapper(type='dangerous') %}
{% include "partials/check/letter-too-long.html" %}
{% endcall %}
</div>

View File

@@ -15,7 +15,6 @@
message_count_label(1, template.template_type, suffix='') | capitalize,
back_link=back_link
) }}
<p>
{% if is_precompiled_letter %}
Provided as PDF
@@ -45,7 +44,7 @@
</p>
{% elif notification_status == 'validation-failed' %}
<p class="notification-status-cancelled">
Validation failed content is outside the printable area
Validation failed. {{ message.detail | safe }}
</p>
{% elif notification_status == 'technical-failure' %}
<p class="notification-status-cancelled">

View File

@@ -21,10 +21,10 @@
)}}
</div>
<div class="column-whole template-container">
{% if result %}
{% if passed_validation %}
{{ banner(message, with_tick=True) }}
{% elif message %}
{{ banner(message, 'dangerous')}}
{% include "partials/check/letter-validation-failed-banner.html" %}
{% endif %}
{% for page in pages %}

View File

@@ -17,7 +17,7 @@
<div class="grid-row">
{% if template.template_type == 'letter' %}
{% if letter_too_long %}
{% call banner_wrapper(type='dangerous', id='letter-too-long') %}
{% call banner_wrapper(type='dangerous') %}
{% include "partials/check/letter-too-long.html" %}
{% endcall %}
{% endif %}

View File

@@ -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