diff --git a/files/assets/js/general16.js b/files/assets/js/general16.js index e611d08f5..0d1edae57 100644 --- a/files/assets/js/general16.js +++ b/files/assets/js/general16.js @@ -311,7 +311,7 @@ function post(url, callback, errortext) { xhr.send(form); }; -function post_toast(url, reload, data) { +function post_toast(url, reload, callback, data) { var xhr = new XMLHttpRequest(); xhr.open("POST", url, true); var form = new FormData() @@ -337,6 +337,10 @@ function post_toast(url, reload, data) { } if (reload == 1) {window.location.reload(true)} + else { + try {callback(xhr)} + catch(e) {} + } return true } else if (xhr.status >= 300 && xhr.status < 400) { diff --git a/files/templates/header.html b/files/templates/header.html index 6955dd13b..882581002 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -130,7 +130,7 @@
- Log out + Log out
@@ -190,7 +190,7 @@ {% else %}