[Mpuls-commits] r1399 - wasko/branches/2.0/mpulsweb/controllers

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


Author: torsten
Date: 2010-02-09 16:04:50 +0100 (Tue, 09 Feb 2010)
New Revision: 1399

Modified:
   wasko/branches/2.0/mpulsweb/controllers/settings.py
Log:
Render new templates unter /settings


Modified: wasko/branches/2.0/mpulsweb/controllers/settings.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/settings.py	2010-02-09 15:04:12 UTC (rev 1398)
+++ wasko/branches/2.0/mpulsweb/controllers/settings.py	2010-02-09 15:04:50 UTC (rev 1399)
@@ -12,6 +12,9 @@
 
 log = logging.getLogger(__name__)
 
+EDIT_AGENCY_SUCCESS_HEADER = _('adm_edit_agency_header')
+EDIT_AGENCY_SUCCESS_TEXT = _('adm_edit_agency_text')
+
 class SettingsController(BaseController):
 
     @checkRole('admin_ka')
@@ -19,14 +22,14 @@
         c.form_errors = {}
         c.form_result = {}
         c.agency = Agency()
-        return render('administration/show_settings.mako')
+        return render('/settings/show.mako')
 
     @checkRole('admin_ka')
     def editSettings(self):
         c.form_errors = {}
         c.form_result = {}
         c.agency = Agency()
-        return render('administration/edit_settings.mako')
+        return render('/settings/edit.mako')
 
     @checkRole('admin_ka')
     def editSettingsAction(self):
@@ -37,12 +40,12 @@
         except formencode.Invalid, error:
             c.form_result = error.value
             c.form_errors = error.error_dict or {}
-            return render('/administration/edit_settings.mako')
+            return render('/settings/edit.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')
+        c.dialog_title = EDIT_AGENCY_SUCCESS_HEADER
+        c.dialog_text  = EDIT_AGENCY_SUCCESS_TEXT
+        c.url_ok = "/settings"
+        return render ('/settings/dialogs/success_edit.mako')
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list