Module: check_mk
Branch: master
Commit: 6ccf18817b08ec85fc8362884c95978dd5c59348
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ccf18817b08ec…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 12 15:14:24 2012 +0100
ValueSpec ListOf(): fix complain situation
---
web/htdocs/check_mk.css | 6 +++---
web/htdocs/valuespec.py | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 5017605..e59458c 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -321,8 +321,8 @@ table.valuespec_listof td.vlof_buttons {
white-space: nowrap;
}
table.valuespec_listof td.vlof_content {
- border: 1px solid white;
- box-shadow: 1px 1px 2px #808080;
- background-image: url("images/form_background.png");
+ /* border: 1px solid white;
+ box-shadow: 1px 1px 2px #808080; */
+ background-image: url("images/form_background.png");
background-repeat: repeat;
}
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 5bd8b5b..602dbd9 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -563,6 +563,9 @@ class ListOf(ValueSpec):
# numbering in labels, etc. possible). The current number
# of entries is stored in the hidden variable 'varprefix'
def render_input(self, varprefix, value):
+ if html.has_var(varprefix + "_count"): # already filled in, complain
+ value = self.from_html_vars(varprefix)
+
html.write('<input type=hidden name="%s_count"
value="%d" id="%s_count">\n' %
(varprefix, len(value), varprefix))