diff --git a/src/pretix/base/templates/400.html b/src/pretix/base/templates/400.html
index df162b1d97..ea65f58983 100644
--- a/src/pretix/base/templates/400.html
+++ b/src/pretix/base/templates/400.html
@@ -6,7 +6,7 @@
{% trans "Bad Request" %}
{% trans "We were unable to parse your request." %}
{{ exception }}
-
+
{% trans "Take a step back" %}
· {% trans "Try again" %}
diff --git a/src/pretix/base/templates/403.html b/src/pretix/base/templates/403.html
index eff0694c1a..2d39c0aa22 100644
--- a/src/pretix/base/templates/403.html
+++ b/src/pretix/base/templates/403.html
@@ -6,7 +6,7 @@
{% trans "Permission denied" %}
{% trans "You do not have access to this page." %}
{{ exception }}
-
+
{% trans "Take a step back" %}
· {% trans "Try again" %}
diff --git a/src/pretix/base/templates/404.html b/src/pretix/base/templates/404.html
index b6b5f5fd1c..943af33de3 100644
--- a/src/pretix/base/templates/404.html
+++ b/src/pretix/base/templates/404.html
@@ -6,7 +6,7 @@
{% trans "Not found" %}
{% trans "I'm afraid we could not find the the resource you requested." %}
{{ exception }}
-
+
{% trans "Take a step back" %}
{% endblock %}
\ No newline at end of file
diff --git a/src/pretix/base/templates/500.html b/src/pretix/base/templates/500.html
index 5aec75859e..607bd89731 100644
--- a/src/pretix/base/templates/500.html
+++ b/src/pretix/base/templates/500.html
@@ -7,7 +7,7 @@
{% trans "We had trouble processing your request." %}
{% trans "If this problem persists, please contact us." %}
{{ exception }}
-
+
{% trans "Take a step back" %}
· {% trans "Try again" %}
diff --git a/src/pretix/base/templates/csrffail.html b/src/pretix/base/templates/csrffail.html
index a1b44b5d1a..730f6df6e5 100644
--- a/src/pretix/base/templates/csrffail.html
+++ b/src/pretix/base/templates/csrffail.html
@@ -18,7 +18,7 @@
Please go back to the last page, refresh this page and then try again. If the problem persists, please get in touch with us.
{% endblocktrans %}
{% endif %}
-
+
{% trans "Take a step back" %}
{% endblock %}
\ No newline at end of file
diff --git a/src/pretix/presale/templates/pretixpresale/base.html b/src/pretix/presale/templates/pretixpresale/base.html
index 89b6642943..64b97cbbdb 100644
--- a/src/pretix/presale/templates/pretixpresale/base.html
+++ b/src/pretix/presale/templates/pretixpresale/base.html
@@ -37,6 +37,8 @@
{% endblocktrans %}
{% endwith %}
+
+
{% trans "We are processing your request…" %}
diff --git a/src/static/pretixpresale/js/ui/asynctask.js b/src/static/pretixpresale/js/ui/asynctask.js
index 143a95962b..a96c4ce865 100644
--- a/src/static/pretixpresale/js/ui/asynctask.js
+++ b/src/static/pretixpresale/js/ui/asynctask.js
@@ -42,10 +42,12 @@ function async_task_error(jqXHR, textStatus, errorThrown) {
"use strict";
waitingDialog.hide();
// TODO: Handle status codes != 200
- // if(jqXHR.status == 500) {
- // } if(jqXHR.status == 403) {
- // } if(jqXHR.status == 503) {
- // }
+ var c = $(jqXHR.responseText).filter('.container');
+ if (c.length > 0) {
+ ajaxErrDialog.show(c.first().html());
+ } else {
+ alert(gettext('Unknown error.'));
+ }
}
$(function () {
diff --git a/src/static/pretixpresale/js/ui/main.js b/src/static/pretixpresale/js/ui/main.js
index 3aaaebf1e5..0b2d495130 100644
--- a/src/static/pretixpresale/js/ui/main.js
+++ b/src/static/pretixpresale/js/ui/main.js
@@ -19,6 +19,8 @@ $(function () {
$("#voucher-box").slideDown();
$("#voucher-toggle").slideUp();
});
+
+ $("#ajaxerr").on("click", ".ajaxerr-close", ajaxErrDialog.hide);
});
var waitingDialog = {
@@ -32,3 +34,17 @@ var waitingDialog = {
$("body").removeClass("loading");
}
};
+
+var ajaxErrDialog = {
+ show: function (c) {
+ "use strict";
+ $("#ajaxerr").html(c);
+ $("#ajaxerr .links").html("
"
+ + gettext("Close message") + "");
+ $("body").addClass("ajaxerr");
+ },
+ hide: function () {
+ "use strict";
+ $("body").removeClass("ajaxerr");
+ }
+};
\ No newline at end of file
diff --git a/src/static/pretixpresale/scss/main.scss b/src/static/pretixpresale/scss/main.scss
index 5a552e1898..7c6687979b 100644
--- a/src/static/pretixpresale/scss/main.scss
+++ b/src/static/pretixpresale/scss/main.scss
@@ -64,7 +64,7 @@ body.loading .container {
filter: blur(2px);
}
-#loadingmodal {
+#loadingmodal, #ajaxerr {
position: fixed;
top: 0;
left: 0;
@@ -76,16 +76,25 @@ body.loading .container {
z-index: 900000;
visibility: hidden;
- .big-rotating-icon {
+ .big-icon {
margin-top: 50px;
+ font-size: 200px;
+ color: $brand-primary;
+ }
+
+ .big-rotating-icon {
-webkit-animation: fa-spin 8s infinite linear;
animation: fa-spin 8s infinite linear;
+ margin-top: 50px;
font-size: 200px;
color: $brand-primary;
}
}
+#ajaxerr {
+ background: rgba(236, 236, 236, .9);
+}
-.loading #loadingmodal {
+.loading #loadingmodal, .ajaxerr #ajaxerr {
opacity: 1;
visibility: visible;
transition: opacity .5s ease-in-out;