Module: check_mk
Branch: master
Commit: 7d81876c26166b7353e2fc66c11406bb30bba846
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d81876c26166b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 28 10:08:30 2013 +0200
FIX: Fixed first toggle of flags in global settings when default is set to True
Conflicts:
web/htdocs/wato.py
---
ChangeLog | 1 +
web/htdocs/wato.py | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 88a058e..4b3701e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -321,6 +321,7 @@
* FIX: automation users can now be deleted again (bug was introduced in 1.2.2p1)
* FIX: fix logwatch pattern analyzer message "The host xyz is not
managed by WATO." after direct access via snapin
+ * FIX: Fixed first toggle of flags in global settings when default is set to True
Event Console:
* FIX: apply rewriting of application/hostname also when cancelling events
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1cfdd54..fcb7b90 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5621,7 +5621,7 @@ def mode_globalvars(phase):
action = html.var("_action")
if varname:
domain, valuespec, need_restart, allow_reset, in_global_settings =
g_configvars[varname]
- def_value = default_values.get(varname, valuespec.canonical_value())
+ def_value = default_values.get(varname, valuespec.default_value())
if action == "reset" and not isinstance(valuespec, Checkbox):
c = wato_confirm(
@@ -5631,8 +5631,9 @@ def mode_globalvars(phase):
(varname, valuespec.value_to_text(def_value)))
else:
if not html.check_transaction():
- return
+ return
c = True # no confirmation for direct toggle
+
if c:
# if action == "reset":
# del current_settings[varname]