Module: check_mk
Branch: master
Commit: a7ee775afaca37b908d294520a4ec36a442bd4a8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a7ee775afaca37…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Mar 8 09:10:02 2013 +0100
FIX: ValueSpec OptionalDropDown: fix visibility if default is "other"
---
ChangeLog | 1 +
web/htdocs/valuespec.py | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5480b67..64a5db7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -132,6 +132,7 @@
within the group
* FIX: Fixed exception when editing contactgroups without alias
* FIX: Fix localization of rule options
+ * FIX: ValueSpec OptionalDropDown: fix visibility if default is "other"
* Suggest use default value for filesystem levels that make sense
* Valuespec: CascadingDropdown now able to process choice values from functions
* Freshness checking for classical passive Nagios checks (custom_checks)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index d12a6f9..a114846 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1244,7 +1244,7 @@ class OptionalDropdownChoice(ValueSpec):
options.append(("other", self._otherlabel))
html.select(varprefix, options, defval, #
attrs={"style":"float:left;"},
onchange="valuespec_toggle_dropdown(this,
'%s_ex');" % varprefix )
- if html.form_submitted():
+ if html.has_var(varprefix):
div_is_open = html.var(varprefix) == "other"
else:
div_is_open = self.value_is_explicit(value)