Module: check_mk
Branch: master
Commit: faf55a5cf94147003251d62e38984770ea8009e5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=faf55a5cf94147…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 16 13:27:51 2018 +0200
5977 FIX Fixed broken dropdown fields in several places
Some dropdown (select) fields were broken in Check_MK 1.5.0 for a longer time,
especially in WATO configuration dialogs. This issue existed in all previous
1.5.0 releases.
E.g. when setting the "Match syslog priority" option in a Event Console rule,
the selected option was not persisted as expected.
Change-Id: I68d266e1e12fdbd6249c4c5cc5741112fc84381b
---
.werks/5977 | 16 ++++++++++++++++
web/htdocs/htmllib.py | 4 ++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/5977 b/.werks/5977
new file mode 100644
index 0000000..1c90837
--- /dev/null
+++ b/.werks/5977
@@ -0,0 +1,16 @@
+Title: Fixed broken dropdown fields in several places
+Level: 2
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1523877884
+
+Some dropdown (select) fields were broken in Check_MK 1.5.0 for a longer time,
+especially in WATO configuration dialogs. This issue existed in all previous
+1.5.0 releases.
+
+E.g. when setting the "Match syslog priority" option in a Event Console rule,
+the selected option was not persisted as expected.
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 3692a82..0357c31 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -2430,8 +2430,8 @@ class html(HTMLGenerator, RequestHandler):
if error:
self.open_x(class_="inputerror")
- if "read_only" in attrs:
- attrs["disabled"] = "disabled" if
attrs.pop("read_only") else None
+ if "read_only" in attrs and attrs.pop("read_only"):
+ attrs["disabled"] = "disabled"
self.hidden_field(varname, current, add_var=False)
self.open_select(name=varname, id_=varname, **attrs)