[Mpuls-commits] r877 - wasko/branches/2.0/waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 26 12:55:51 CET 2010


Author: torsten
Date: 2010-01-26 12:55:49 +0100 (Tue, 26 Jan 2010)
New Revision: 877

Modified:
   wasko/branches/2.0/waskaweb/lib/helpers.py
Log:
* waskaweb/lib/helpers.py (getFormularErrors): Removed. Not called from anywhere.


Modified: wasko/branches/2.0/waskaweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/helpers.py	2010-01-26 11:52:26 UTC (rev 876)
+++ wasko/branches/2.0/waskaweb/lib/helpers.py	2010-01-26 11:55:49 UTC (rev 877)
@@ -270,50 +270,9 @@
         out.append('</a>')
     return "".join(out)
 
-
 def getFormularName(page_id):
     return get_pagename(page_id)
 
-def getErrorsAndWarningsOnPage(page_id, warnings=None):
-    out = "Errors"
-    return out
-    #if page_id is None: return u""
-    #case = session.get('case')
-    #if not case: return ""
-    #navigation = session.get('navigation.tree')
-    #if not navigation: return ""
-    #tree_item = navigation.getTreeItem(page_id)
-    #if not tree_item: return ""
-    #page_name = tree_item.name
-    #if not page_name: return ""
-    #case_id  = case.id
-    #errors   = case.getFormErrors()
-    #formed   = g.formedTree
-    #page     = formed.findByClassAndName(PageNode, page_name)
-    #if not page: return ""
-    #if warnings is None:
-    #    warnings = formed.warningsOnPage(page, case_id)
-    #renderer = ErrorRenderer(errors, warnings, FileCache())
-    #out = renderer.render(page)
-    #return out
-
-def getFormularErrors(page_id):
-    errors_on_page = {}
-    # Get treeitem
-    navigation = session.get('navigation.tree')
-    try:
-        ti = navigation.getTreeItem(page_id)
-    except:
-        return {}
-    errors = session.get('case').getFormErrors()
-    try:
-        for key, err in errors.iteritems():
-            if err.page == ti.page:
-                errors_on_page[key] = err
-    except:
-        pass
-    return errors_on_page
-
 def getPrintUrl(print_form, ds_id, page_id):
     if print_form == "digest":
         return "/case/printout/%s/0/digest" % (ds_id)



More information about the Mpuls-commits mailing list