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:
Pea Tyczynska
2019-10-24 22:57:05 +01:00
parent f2c7eb5c3e
commit 5e10ed23a1
5 changed files with 14 additions and 18 deletions

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