If we left with an empty page (no visible boxes) after switching from Expert to Basic settings, redirect to admin/settings/system instead

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-03-12 19:17:52 +01:00
parent d82feab8ac
commit 9e8467c417

View File

@@ -696,8 +696,9 @@ function applyExpertSettings() {
$(".settings-level-basic").show();
$(".settings-level-expert").hide();
// if we are on admin/settings/all, redirect to admin/settings/system
if (window.location.pathname === "/admin/settings/all") {
// If we left with an empty page (no visible boxes) after switching from
// Expert to Basic settings, redirect to admin/settings/system instead
if ($(".box:visible").length === 0) {
window.location.href = "/admin/settings/system";
}
}