Module: check_mk
Branch: master
Commit: 5aa8d0fed5deb444011a24704b8eb3a82cab628a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5aa8d0fed5deb4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Dec 23 12:34:23 2011 +0100
WATO: Bugfix, expand checkboxes of Dictionary(ValueSpec) after page reload
---
web/htdocs/wato.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 8a113a8..f6dd9f5 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -4953,11 +4953,14 @@ class Dictionary(ValueSpec):
html.write("<tr><td>")
vp = varprefix + "_" + param
div_id = vp
+ visible = html.get_checkbox(vp + "_USE")
+ if visible == None:
+ visible = param in value
html.checkbox(vp + "_USE", param in value,
onclick="wato_toggle_option(this, %r)" % div_id)
html.write(" %s<br>" % vs.title())
html.write('<div class=dictelement id="%s"
style="display: %s">' % (
- div_id, param not in value and "none" or ""))
+ div_id, not visible and "none" or ""))
if vs.help():
html.write("<ul class=help>%s</ul>" % vs.help())
vs.render_input(vp, value.get(param, vs.canonical_value()))