handles session timeouts in modals (#1092)

This commit is contained in:
Kevin Papst
2019-09-10 17:07:34 +02:00
committed by GitHub
parent a651e55dc9
commit cdcf9eaf67
12 changed files with 86 additions and 14 deletions

View File

@@ -57,12 +57,9 @@ export default class KimaiAjaxModalForm extends KimaiClickHandlerReducedInTableR
if (errorHandler === undefined) {
errorHandler = function(xhr, err) {
if (xhr.status !== undefined && xhr.status === 403) {
const alert = self.getContainer().getPlugin('alert');
alert.error(xhr.statusText);
return;
if (xhr.status === undefined || xhr.status !== 403) {
window.location = url;
}
window.location = url;
};
}