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