[Mpuls-commits] r749 - in wasko/branches/2.0: . waskaweb/controllers waskaweb/lib waskaweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jan 13 10:40:04 CET 2010


Author: torsten
Date: 2010-01-13 10:40:02 +0100 (Wed, 13 Jan 2010)
New Revision: 749

Modified:
   wasko/branches/2.0/ChangeLog.txt
   wasko/branches/2.0/waskaweb/controllers/formularpage.py
   wasko/branches/2.0/waskaweb/lib/renderer_new.py
   wasko/branches/2.0/waskaweb/templates/casemanagement/overview.mako
Log:
Fixed some rendering issue comming with update to 0.9.7


Modified: wasko/branches/2.0/ChangeLog.txt
===================================================================
--- wasko/branches/2.0/ChangeLog.txt	2010-01-13 08:48:49 UTC (rev 748)
+++ wasko/branches/2.0/ChangeLog.txt	2010-01-13 09:40:02 UTC (rev 749)
@@ -14,6 +14,14 @@
 	  Further enabled feature to run the appliction as paster app. DB-Name
 	  ist then fetched from the config file.
 
+	Fixed some rendering issue comming with 0.9.7 of pylons
+
+	* waskaweb/controllers/formularpage.py,
+	  waskaweb/lib/renderer_new.py,
+	  waskaweb/templates/casemanagement/overview.mako: Added some
+	  debugging and removed use of htmlfill for formularpage rendering as
+	  it seems to overwrite existing values.
+
 2010-01-08 	Frank Koormann <frank.koormann at intevation.de>
 
 	* waskaweb/templates/caselifetime/overview.mako: Typo fixed

Modified: wasko/branches/2.0/waskaweb/controllers/formularpage.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/formularpage.py	2010-01-13 08:48:49 UTC (rev 748)
+++ wasko/branches/2.0/waskaweb/controllers/formularpage.py	2010-01-13 09:40:02 UTC (rev 749)
@@ -63,6 +63,8 @@
     instance_tree = factory.loadInstanceTreeByIdentifier(
         session['case'].id, 
         session.get('uncommited_fields'))
+
+    log.debug('Getting page "%s"' % id)
     page = instance_tree.getItem(id)
 
     errors   = convertErrorItem2ErrorDic(page.getErrors()) 
@@ -97,9 +99,10 @@
     # Currently values of the fields are set within the renderer. 
     # Htmlfill is used to fill in the error values from the error items.
     return formencode.htmlfill.render(form,
-    defaults=defaults, \
-    errors=errors,
-    auto_insert_errors=False)
+        defaults=defaults, \
+        errors=errors,
+        auto_insert_errors=False, 
+        force_defaults=False)
 
 class FormularpageController(BaseController):
 

Modified: wasko/branches/2.0/waskaweb/lib/renderer_new.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/renderer_new.py	2010-01-13 08:48:49 UTC (rev 748)
+++ wasko/branches/2.0/waskaweb/lib/renderer_new.py	2010-01-13 09:40:02 UTC (rev 749)
@@ -128,6 +128,8 @@
 class ViewRenderer:
 
     def __init__(self, it=None, page=None, ro_mode=True):
+        log.debug(page)
+        log.debug(page.getIdentifier())
         self.it              = it # instancetree
         self.page            = page
         self.stateStack      = None
@@ -148,11 +150,11 @@
             # Add submitbutton at the top of the page too
             out.append('<div class="widget formbuttons">')
             out.append('<input type="submit" name="save" value="%s" %s>' % (_('Save'), self.next_tabindex()))
-            out.append('<input type="hidden" name="page" value="%s">' % (self.page.getIdentifier()))
             if showNext:
                 out.append('&nbsp;<input type="submit" name="savenext" value="%s" %s>' % (_('Save and proceed'), self.next_tabindex()))
             out.append('</div>')
         out.append('<div class="widget formfields">')
+        out.append('<input type="hidden" name="page" value="%s">' % (self.page.getIdentifier()))
 
         self.stateStack = []
         self.containersStack = [[Container(None) ]]

Modified: wasko/branches/2.0/waskaweb/templates/casemanagement/overview.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/casemanagement/overview.mako	2010-01-13 08:48:49 UTC (rev 748)
+++ wasko/branches/2.0/waskaweb/templates/casemanagement/overview.mako	2010-01-13 09:40:02 UTC (rev 749)
@@ -17,7 +17,7 @@
 <%include file="/casemanagement/search.mako" />
 Es wurden ${c.count_all} Fallakten gefunden
 <div class="waska_form">
-  ${h.form(h.url(action='bundleAction'), method='post')}
+  <form action="bundleAction" method="POST">
   <%include file="./caselist.mako" />
   <div class="waska_form_element">
     <input type="checkbox" name="all_cases" id="all_cases" value="1"><label for="all_cases">Alle angezeigten Fallakten (${c.count_all}) auswählen</label>
@@ -50,6 +50,6 @@
   <div class="waska_form_element w50">
     <input type="submit" value="Aktion für Auswahl ausführen">
   </div>
-  ${h.end_form()}
+  </form>
   <br class="newline">
 </div>



More information about the Mpuls-commits mailing list