[Mpuls-commits] r1064 - wasko/branches/2.0/waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 1 14:33:00 CET 2010
Author: torsten
Date: 2010-02-01 14:33:00 +0100 (Mon, 01 Feb 2010)
New Revision: 1064
Modified:
wasko/branches/2.0/waskaweb/controllers/case.py
Log:
* waskaweb/controllers/case.py (CaseController.saveLogbookEntry):
Deleted. Not called from anywhere now.
Modified: wasko/branches/2.0/waskaweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/case.py 2010-02-01 13:31:35 UTC (rev 1063)
+++ wasko/branches/2.0/waskaweb/controllers/case.py 2010-02-01 13:33:00 UTC (rev 1064)
@@ -876,46 +876,6 @@
errors=c.form_errors)
@checkRole('cm_ka')
- def saveLogbookEntry(self):
- params = request.params
- id = self._checkInt(params.getone('id'))
- checker = LogbookEntryChecker(params, check_case_id=False)
- validator = EditLogbookForm()
-
- try:
- c.ds_id = session['case'].id
- form_result = validator.to_python(params)
- except formencode.Invalid, error:
- c.form_result = error.value
- c.form_errors = error.error_dict or {}
- form = render('/logbook/new.mako')
- return formencode.htmlfill.render(unicode(form, 'utf-8'),
- defaults=c.form_result,
- auto_insert_errors=False,
- errors=c.form_errors)
-
- #if checker.hasErrors():
- # c.errors = checker.getErrors()
- # c.entry = checker.getLogbookEntry()
- # c.entry.setId(id)
- # return render('/logbook/edit.mako')
-
- try:
- entry = checker.getLogbookEntry()
- entry.setId(id)
- entry.storeForUser(session['USER_AUTHORIZED'].id)
- c.success_for = LOGBOOK_ENTRY_SAVE_SUCCESS
- c.success_text = LOGBOOK_ENTRY_SAVE_SUCCESS_TEXT
- c.url_ok = "/case/logbook/%s" % str(session['case'].id)
- return render('/logbook/dialogs/success_save_logbook_entry.mako')
- except:
- traceback.print_exc(file=sys.stderr)
- c.failed_for = LOGBOOK_ENTRY_SAVE_FAILED
- c.failed_text = LOGBOOK_ENTRY_SAVE_FAILED_TEXT
- c.url_ok = "/case/logbook/%s" % str(session['case'].id)
- return render('/logbook/dialogs/failed_save_logbook_entry.mako')
-
- @checkRole('cm_ka')
def deleteLogbookEntry(self, id, confirmed=False):
id = self._checkInt(id)
confirmed = self._checkBool(confirmed)
More information about the Mpuls-commits
mailing list