mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fix non-functional login page after session timeout
This commit is contained in:
@@ -46,4 +46,5 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
<!-- pretix-login-marker -->{# marker required for ajax calls to detect that user session is over #}
|
||||
{% endblock %}
|
||||
|
||||
@@ -100,7 +100,9 @@ var i18nToString = function (i18nstring) {
|
||||
$(document).ajaxError(function (event, jqXHR, settings, thrownError) {
|
||||
waitingDialog.hide();
|
||||
var c = $(jqXHR.responseText).filter('.container');
|
||||
if (c.length > 0) {
|
||||
if (jqXHR.responseText.indexOf("<!-- pretix-login-marker -->") !== -1) {
|
||||
location.href = '/control/login?next=' + encodeURIComponent(location.pathname + location.search + location.hash)
|
||||
} else if (c.length > 0) {
|
||||
ajaxErrDialog.show(c.first().html());
|
||||
} else if (thrownError !== "abort" && thrownError !== "") {
|
||||
console.log(thrownError);
|
||||
|
||||
Reference in New Issue
Block a user