[Mpuls-commits] r2014 - in wasko/branches/2.0: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 18 20:28:36 CET 2010


Author: bh
Date: 2010-03-18 20:28:35 +0100 (Thu, 18 Mar 2010)
New Revision: 2014

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/controllers/formularpage.py
Log:
* mpulsweb/controllers/formularpage.py (get_rendered_page): Render
the warnings produces while rendering the widgets. Missing
required fields are now warned about again, as long as warning
rules exist for them.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-18 19:23:29 UTC (rev 2013)
+++ wasko/branches/2.0/ChangeLog	2010-03-18 19:28:35 UTC (rev 2014)
@@ -1,5 +1,12 @@
 2010-03-18  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/formularpage.py (get_rendered_page): Render
+	the warnings produces while rendering the widgets. Missing
+	required fields are now warned about again, as long as warning
+	rules exist for them.
+
+2010-03-18  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/renderer.py (ViewRenderer.__init__): Add instance
 	variable for warnings
 	(ViewRenderer._checkWarnings): New.  Checks a given node for

Modified: wasko/branches/2.0/mpulsweb/controllers/formularpage.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/formularpage.py	2010-03-18 19:23:29 UTC (rev 2013)
+++ wasko/branches/2.0/mpulsweb/controllers/formularpage.py	2010-03-18 19:28:35 UTC (rev 2014)
@@ -74,7 +74,6 @@
     log.debug('Getting page "%s"' % id)
     page = instance_tree.getItem(id)
 
-    warnings = {}
     errors, defaults = convert_error_items(page.getErrors())
 
     if page:
@@ -90,8 +89,6 @@
             c.formularerrors = u"Fehler"
             renderer = ViewRenderer(instance_tree, page,
                                     session.get('render_mode', 'ro') == 'ro')
-        errorrenderer = ErrorRenderer(errors, warnings)
-        c.formularerrors = errorrenderer.render(page)
         try:
             mark_folderopen(session['navigation.tree'].getTreeItem(id))
             if session['navigation.tree'].getTreeItem(id).nextKey():
@@ -100,6 +97,7 @@
                 c.formular = renderer.render(showNext=False)
         except Exception, e:
             log.exception(e)
+        c.formularerrors = ErrorRenderer(errors, renderer.warnings).render(page)
         c.page_id = page.getIdentifier()
         session['case'].setPageId(c.page_id)
         session['navigation.selectedpage'] = id



More information about the Mpuls-commits mailing list