Add prefs for help and developer menu voices.

This commit is contained in:
Nicolo Maio 2023-05-08 12:42:27 +00:00
parent 162ab5ce59
commit 18d7b267b8
5 changed files with 77 additions and 27 deletions

View file

@ -41,9 +41,14 @@ local auth_toggles = {
["local"] = "toggle_local_auth",
["ldap"] = "toggle_ldap_auth",
["http"] = "toggle_http_auth",
["radius"] = "toggle_radius_auth"
["radius"] = "toggle_radius_auth",
["menu_voices"] = {
["help"] = "toggle_menu_voice_help",
["developer"] = "toggle_menu_voice_developer"
}
}
if auth.has_capability(auth.capabilities.preferences) then
if not table.empty(_POST) then
if _GET["tab"] == "auth" then
@ -952,6 +957,27 @@ if auth.has_capability(auth.capabilities.preferences) then
})
end
-- #####################
local function printMenuVoicesPrefs()
print('<thead class="table-primary"><tr><th colspan=2 class="info">' .. i18n("prefs.menu_voices") ..
'</th></tr></thead>')
prefsToggleButton(subpage_active, {
field = auth_toggles["menu_voices"]["help"],
pref = "menu_voices.help",
default = "0"
})
prefsToggleButton(subpage_active, {
field = auth_toggles["menu_voices"]["developer"],
pref = "menu_voices.developer",
default = "0"
})
end
-- #####################
function printAuthentication()
@ -984,6 +1010,8 @@ if auth.has_capability(auth.capabilities.preferences) then
printLocalAuth()
end
printMenuVoicesPrefs()
if not ntop.isnEdge() then
prefsInformativeField(i18n("notes"), i18n("prefs.auth_methods_order"))
else