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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 25 21:01:16 CET 2010


Author: bh
Date: 2010-03-25 21:01:14 +0100 (Thu, 25 Mar 2010)
New Revision: 2224

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/controllers/privacy.py
Log:
* mpulsweb/controllers/privacy.py: Fix formatting.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-25 19:57:41 UTC (rev 2223)
+++ wasko/branches/2.0/ChangeLog	2010-03-25 20:01:14 UTC (rev 2224)
@@ -1,5 +1,9 @@
 2010-03-25  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/privacy.py: Fix formatting.
+
+2010-03-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/phase.py: Fix formatting.
 
 2010-03-25  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/mpulsweb/controllers/privacy.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/privacy.py	2010-03-25 19:57:41 UTC (rev 2223)
+++ wasko/branches/2.0/mpulsweb/controllers/privacy.py	2010-03-25 20:01:14 UTC (rev 2224)
@@ -7,11 +7,11 @@
 from mpulsweb.lib.security import checkRole
 from mpulsweb.lib.base import BaseController, render, c, h, session
 from mpulsweb.lib.anonymize import determineAnonymizedCaseEndPhase
-from mpulsweb.model.phase import ConsistenceCheckException 
+from mpulsweb.model.phase import ConsistenceCheckException
 
 from mpulsweb.controllers.case import ANONYMIZE_CONFIRM, \
-    MARKANONYMIZE_CONFIRM_TEXT, MARKANONYMIZE_SUCCESS, MARKANONYMIZE_SUCCESS_TEXT, \
-    MARKANONYMIZE_FAILED
+     MARKANONYMIZE_CONFIRM_TEXT, MARKANONYMIZE_SUCCESS, \
+     MARKANONYMIZE_SUCCESS_TEXT, MARKANONYMIZE_FAILED
 
 HEADER = u"""Einverständniserklärung setzen?"""
 ACCEPT_QUESTION = u"""\
@@ -22,14 +22,17 @@
 SET_EE_ACCEPT_SUCCESS_TEXT = u"""\
 Bitte klicken Sie auf "OK", um mit der Bearbeitung der Fallakte fortzufahren."""
 
+
 log = logging.getLogger(__name__)
 
+
 class PrivacyController(BaseController):
+
     '''
     Controller to handle privacy related things within mpuls. This mainly
     includes accepting or declining the 'Childs declaration of consent' (known
     in WASKA/WASKO) or similar. Additionally it is possible to list available
-    static statements. 
+    static statements.
     '''
     @checkRole('cm')
     def index(self):
@@ -37,7 +40,7 @@
 
     @checkRole('cm')
     def listStatements(self):
-        '''Will render a list of available static statements related to privacy in mpuls'''
+        """Render a list of available static statements related to privacy"""
         return render('privacy/list_statements.mako')
 
     @checkRole('cm')
@@ -49,7 +52,7 @@
         return render('privacy/default_statement.mako')
 
     @checkRole('cm')
-    def set(self,id):
+    def set(self, id):
         c.targeturl = h.url_for(controller="/case", action="digest", id=id)
         c.ds_id = id
         return render('privacy/edit_statement.mako')
@@ -75,8 +78,7 @@
         else:
             c.dialog_title = HEADER
             c.dialog_text = ACCEPT_QUESTION
-            c.url_yes = h.url_for(controller="privacy",
-                                  action="accept",
+            c.url_yes = h.url_for(controller="privacy", action="accept",
                                   id=id, confirmed="1")
             c.url_no = h.url_for(controller="/case", action="select",
                                  id=id, confirmed=0)
@@ -93,15 +95,16 @@
         # relevant date fields plus additionally some fields (e.g type of end
         # of cm)
 
-        # TODO: Get minimum fields from mpuls_config 
+        # TODO: Get minimum fields from mpuls_config
         #min_fields = g.mpuls_config...
-        min_fields = [] # Check all fields 
+        min_fields = [] # Check all fields
         try:
             case.check_anonymizeability(min_fields)
         except ConsistenceCheckException, e:
-            c.dialog_title =  MARKANONYMIZE_FAILED
-            c.dialog_text  =  e.value 
-            c.url_ok = h.url_for(controller='/case', action='digest', id=case.id) 
+            c.dialog_title = MARKANONYMIZE_FAILED
+            c.dialog_text = e.value
+            c.url_ok = h.url_for(controller='/case', action='digest',
+                                 id=case.id)
             return render('/casemanagement/dialogs/failed_markanonymize.mako')
 
         if confirmed:
@@ -112,7 +115,7 @@
             case.make_anonymizable()
 
             c.dialog_title = MARKANONYMIZE_SUCCESS
-            c.dialog_text  = MARKANONYMIZE_SUCCESS_TEXT
+            c.dialog_text = MARKANONYMIZE_SUCCESS_TEXT
             c.url_ok = h.url_for ('/case_overview')
             return render('/privacy/dialogs/decline_success.mako')
         else:
@@ -121,10 +124,9 @@
             phase = pdescriptions.get(determineAnonymizedCaseEndPhase(case))
             c.dialog_title = ANONYMIZE_CONFIRM
             c.dialog_text = MARKANONYMIZE_CONFIRM_TEXT % phase
-            c.url_yes = h.url_for(controller="privacy",
-                                  action="decline",
+            c.url_yes = h.url_for(controller="privacy", action="decline",
                                   id=id, confirmed="1")
-            c.url_no = h.url_for(controller="/case", action="select", \
+            c.url_no = h.url_for(controller="/case", action="select",
                                  id=id, confirmed=0)
             return render('privacy/dialogs/confirm.mako')
 



More information about the Mpuls-commits mailing list