Module: check_mk
Branch: master
Commit: 8610f407e1e55da321d36265fba57369a7f458e5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8610f407e1e55d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 9 11:02:02 2014 +0200
htmllib: form_submitted can now take form name
---
web/htdocs/htmllib.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 83af97a..56ddb8f 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -197,8 +197,11 @@ class html:
self.write("</form>\n")
self.form_name = None
- def form_submitted(self):
- return self.has_var("filled_in")
+ def form_submitted(self, form_name):
+ if form_name:
+ return self.var("filled_in") == form_name
+ else:
+ return self.has_var("filled_in")
def add_user_error(self, varname, message):
if type(varname) == list: