[Mpuls-commits] r1408 - wasko/branches/2.0/waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 9 16:23:26 CET 2010


Author: torsten
Date: 2010-02-09 16:23:21 +0100 (Tue, 09 Feb 2010)
New Revision: 1408

Modified:
   wasko/branches/2.0/waskaweb/controllers/administration.py
Log:
* waskaweb/controllers/administration.py 
  (AdministrationController.showSettings),
  (AdministrationController.editSettings), 
  (AdministrationController.editSettingsAction): Deleted. Are now
  impleted under mpulsweb.settings.


Modified: wasko/branches/2.0/waskaweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/administration.py	2010-02-09 15:19:46 UTC (rev 1407)
+++ wasko/branches/2.0/waskaweb/controllers/administration.py	2010-02-09 15:23:21 UTC (rev 1408)
@@ -41,12 +41,11 @@
 
 from waskaweb.lib.base import *
 from waskaweb.lib.validators import ValidatorStateObject, NewUserForm, \
-     EditUserForm, NewPasswordForm, EditSettingsForm, DeleteUserHelperForm, \
+     EditUserForm, NewPasswordForm, DeleteUserHelperForm, \
      NewUserGroupForm, EditUserGroupForm
 from mpulsweb.lib.security import checkRole
 
 from waskaweb.model.case import CaseOverview, CaseBundle
-from mpulsweb.model.agencysettings import Agency
 
 from mpulsweb.controllers.administration import AdministrationController as BaseAdministrationController
 
@@ -82,10 +81,6 @@
 EDIT_USER_SUCCESS_HEADER = _('adm_edit_user_header')
 EDIT_USER_SUCCESS_TEXT = _('adm_edit_user_text')
 
-EDIT_AGENCY_SUCCESS_HEADER = _('adm_edit_agency_header')
-EDIT_AGENCY_SUCCESS_TEXT = _('adm_edit_agency_text')
-
-
 class AdministrationController(BaseAdministrationController):
 
     def index(self):
@@ -280,43 +275,4 @@
         except formencode.Invalid, error:
             return self.deleteUser(form_result.get('user_id'), '1')
 
-
-    @checkRole('admin_ka')
-    def showSettings(self):
-        c.form_errors = {}
-        c.form_result = {}
-        try:
-            c.agency = Agency()
-            return render('administration/show_settings.mako')
-        except:
-            return render('/tests/trace.mako')
-
-    @checkRole('admin_ka')
-    def editSettings(self):
-        c.form_errors = {}
-        c.form_result = {}
-        try:
-            c.agency = Agency()
-            return render('administration/edit_settings.mako')
-        except:
-            return render('/tests/trace.mako')
-
-    @checkRole('admin_ka')
-    def editSettingsAction(self):
-        validator = EditSettingsForm()
-        c.agency = Agency()
-        try:
-            c.form_result = validator.to_python(request.params)
-        except formencode.Invalid, error:
-            c.form_result = error.value
-            c.form_errors = error.error_dict or {}
-            return render('/administration/edit_settings.mako')
-
-        c.agency.store(c.form_result)
-        c.success_for = EDIT_AGENCY_SUCCESS_HEADER
-        c.success_text = EDIT_AGENCY_SUCCESS_TEXT
-        c.url_ok = "/administration/showSettings"
-        return render ('/administration/dialogs/success_edit_agency.mako')
-        #return self.showSettings()
-
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list