[Mpuls-commits] r1817 - wasko/branches/2.0/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 25 17:54:47 CET 2010
Author: torsten
Date: 2010-02-25 17:54:47 +0100 (Thu, 25 Feb 2010)
New Revision: 1817
Modified:
wasko/branches/2.0/mpulsweb/controllers/case.py
Log:
* mpulsweb/controllers/case.py (CaseController.markForAnonymizeFromOverview): Copied from jmdweb.
Modified: wasko/branches/2.0/mpulsweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/case.py 2010-02-25 16:36:53 UTC (rev 1816)
+++ wasko/branches/2.0/mpulsweb/controllers/case.py 2010-02-25 16:54:47 UTC (rev 1817)
@@ -134,7 +134,16 @@
# Anonymize
#
@checkRole('cm')
+ def markForAnonymizeFromOverview(self, id, confirmed):
+ url = h.url_for(controller="/case_overview")
+ return self._markForAnonymize(id, confirmed, url)
+
+ @checkRole('cm')
def markForAnonymize(self, id, confirmed):
+ url = "/case/digest/%s" % id
+ return self._markForAnonymize(id, confirmed, url)
+
+ def _markForAnonymize(self, id, confirmed, url):
id = self._checkInt(id)
confirmed = self._checkBool(confirmed)
case = self._loadCase(id)
@@ -145,7 +154,7 @@
except AnonymizeCheckException, e:
c.dialog_title = MARKANONYMIZE_FAILED
c.dialog_text = e.value
- c.url_ok = "/case/digest/%s" % id
+ c.url_ok = url
return render('/casemanagement/dialogs/failed_markanonymize.mako')
# Ok, show confirmation dialog if the user really wants to anonymize the
@@ -166,7 +175,7 @@
c.dialog_title = ANONYMIZE_CONFIRM
c.dialog_text = MARKANONYMIZE_CONFIRM_TEXT % phase
c.url_yes = "/case/markForAnonymize/%s/1" % id
- c.url_no = "/case/digest/%s" % id
+ c.url_no = url
return render('/casemanagement/dialogs/confirm_markanonymize.mako')
@checkRole('admin')
More information about the Mpuls-commits
mailing list