Admin/Config

* handle Ajax errors
This commit is contained in:
Sarjuuk 2025-10-15 00:24:40 +02:00
parent 37beaa2db5
commit a275955ee3

View file

@ -143,7 +143,10 @@
else {
$WH.ae(_status, createStatusIcon(xhr.responseText));
}
},
onFailure: function(xhr) {
$WH.ee(_status);
$WH.ae(_status, createStatusIcon(xhr.status == 403 ? 'Forbidden' : 'Failed to add Cfg'));
}
});
}
@ -204,6 +207,10 @@
onSuccess: function(xhr) {
$WH.ee(_status);
$WH.ae(_status, createStatusIcon(xhr.responseText));
},
onFailure: function(xhr) {
$WH.ee(_status);
$WH.ae(_status, createStatusIcon(xhr.status == 403 ? 'Forbidden' : 'Failed to update Cfg'));
}
});
}
@ -254,7 +261,10 @@
$WH.ee(_status);
$WH.ae(_status, createStatusIcon(xhr.responseText));
}
},
onFailure: function(xhr) {
$WH.ee(_status);
$WH.ae(_status, createStatusIcon(xhr.status == 403 ? 'Forbidden' : 'Failed to remove Cfg'));
}
});
}