diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-11-14 22:07:23 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2016-11-14 22:07:23 +0100 |
commit | 832cf37a97b97061a26e2fdf49c293d26e917ef5 (patch) | |
tree | 6d56fe467239d0e93f450f4e5fbf07df10739d16 /searx/templates | |
parent | 88dfee858e93e54ad6e54801f88b93bfdc2bb149 (diff) | |
download | searxng-832cf37a97b97061a26e2fdf49c293d26e917ef5.tar.gz searxng-832cf37a97b97061a26e2fdf49c293d26e917ef5.zip |
[enh] display errors
also tried flask's flash feature but flask creates session cookies if it
isn't flushed. Avoiding session cookies to preserve privacy
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/oscar/base.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 81d4febcf..220f5f8b1 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -1,3 +1,4 @@ +{% from 'oscar/macros.html' import icon %} <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}> <head> @@ -54,6 +55,20 @@ <body> {% include 'oscar/navbar.html' %} <div class="container"> + {% if errors %} + <div class="alert alert-danger fade in" role="alert"> + <button class="close" data-dismiss="alert" type="button"> + <span aria-hidden="true">×</span> + <span class="sr-only">{{ _('Close') }}</span> + </button> + <strong class="lead">{{ icon('info-sign') }} {{ _('Error!') }}</strong> + <ul> + {% for message in errors %} + <li>{{ message }}</li> + {% endfor %} + </ul> + </div> + {% endif %} {% block site_alert_error %} {% endblock %} |