Module: check_mk
Branch: master
Commit: 771571b4dabee9678176c53e496a216095087516
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=771571b4dabee9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 24 20:14:35 2012 +0200
FIX checkbox filters not effective on commands
---
.bugs/756 | 8 ++++++--
ChangeLog | 2 ++
web/htdocs/htmllib.py | 5 ++---
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/.bugs/756 b/.bugs/756
index 36ed93d..6e59fe2 100644
--- a/.bugs/756
+++ b/.bugs/756
@@ -1,9 +1,9 @@
Title: Filter settings containing checkboxes get unset when issuing commands
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-05-24 19:55:24
Targetversion: 1.2.0
-Class: bug
Open a view, open the filter, deselect "OK" state, save -> you
get less services. No click on commands and issue the command.
@@ -11,3 +11,7 @@ The filter will be ignored.
Reason: the filled_in HTML variable, that is used by get_checkbox()
is now not longer "filter", but "commands".
+
+2012-05-24 20:13:52: changed state open -> done
+This now works. Hope that my fix didn't break anything else.
+Watch of for dialogs with checkboxes....
diff --git a/ChangeLog b/ChangeLog
index d3edd77..6effb00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,8 @@
* FIX: fix sometimes-broken sizing of sidebar and dashboard on Chrome
* FIX: fix dashboard layout on iPad
* FIX: Fixed styling issues of sidebar in IE7
+ * FIX: fix problem where filter settings (of checkboxes) are not effective
+ when it comes to executing commands
Mobile:
* FIX: Fixed logtime filter settings in all mobile views
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 13d12c4..f802712 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -321,8 +321,7 @@ class html:
else: # add *all* get variables, that are not set by any input!
for var, value in self.req.vars.items():
if var not in self.form_vars and \
- (var[0] != "_" or add_action_vars) and \
- var != "filled_in":
+ (var[0] != "_" or add_action_vars): # and var !=
"filled_in":
self.hidden_field(var, value)
def add_global_vars(self, varnames):
@@ -635,7 +634,7 @@ class html:
def form_filled_in(self):
return self.has_var("filled_in") and (
self.form_name == None or \
- self.var("filled_in") == self.form_name)
+ self.form_name in self.list_var("filled_in"))
# Get value of checkbox. Return True, False or None. None means