Module: check_mk
Branch: master
Commit: 10d817c51f50fdbdae15d0bfb3370e46d81196bc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=10d817c51f50fd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 23 15:01:53 2015 +0100
Fixed duplicate html input fields for filled_in, buttons
---
web/htdocs/htmllib.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index dedb631..9be6bfd 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -237,7 +237,7 @@ class html:
self.write('<form id="form_%s" name="%s"
class="%s" action="%s" method="%s"%s%s>\n' %
(enc_name, enc_name, enc_name, self.attrencode(action),
self.attrencode(method),
enctype, onsubmit))
- self.hidden_field("filled_in", name)
+ self.hidden_field("filled_in", name, add_var=True)
if add_transid:
self.hidden_field("_transid", str(self.get_transid()))
self.hidden_fields(self.global_vars)
@@ -342,11 +342,13 @@ class html:
def button(self, *args):
self.image_button(*args)
+
def raw_button(self, varname, title, cssclass=""):
self.write("<input onfocus=\"if (this.blur) this.blur();\"
"
"type=\"submit\" name=\"%s\"
id=\"%s\" value=\"%s\" "
"class=\"%s\" />\n" % \
- ( varname, varname, title, cssclass))
+ (varname, varname, title, cssclass))
+ self.add_form_var(varname)
def buttonlink(self, href, text, add_transid=False, obj_id='',
style='', title='', disabled=''):