Module: check_mk
Branch: master
Commit: 0d6cab35045b4abfd35222e1f1b970849c30c654
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0d6cab35045b4a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 18 17:03:34 2012 +0100
ValueSpec: fix bug in OptionalDropdownChoice rendering
---
web/htdocs/valuespec.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 4665def..b7bca58 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -702,6 +702,9 @@ class OptionalDropdownChoice(ValueSpec):
html.write("</span>")
def value_to_text(self, value):
+ for val, title in self._choices:
+ if val == value:
+ return title
return self._explicit.value_to_text(value)
def from_html_vars(self, varprefix):