diff --git a/hosting/templates/hosting/includes/_messages.html b/hosting/templates/hosting/includes/_messages.html index 12540558..e9a3e681 100644 --- a/hosting/templates/hosting/includes/_messages.html +++ b/hosting/templates/hosting/includes/_messages.html @@ -1,7 +1,7 @@ {% if messages %} <ul class="list-unstyled msg-list"> {% for message in messages %} - <div class="alert {% if message.tags and message.tags == 'error' %} alert-danger {% else %} alert-{{message.tags}} {% endif %}">{{ message|safe }}</div> + <div class="alert {% if message.tags and (message.tags == 'error' or message.tags == 'vat_error') %} alert-danger {% else %} alert-{{message.tags}} {% endif %}">{{ message|safe }}</div> {% endfor %} </ul> {% endif %} \ No newline at end of file diff --git a/hosting/views.py b/hosting/views.py index e88e0f2a..aeca6ada 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -642,7 +642,8 @@ class SettingsView(LoginRequiredMixin, FormView): ) if 'error' in validate_result and validate_result['error']: messages.add_message( - request, messages.ERROR, validate_result["error"], + request, messages.ERROR, + "VAT Number validation error: %s" % validate_result["error"], extra_tags='vat_error' ) else: