[Mpuls-commits] r1308 - in wasko/branches/2.0: . waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 8 12:40:17 CET 2010
Author: bh
Date: 2010-02-08 12:40:14 +0100 (Mon, 08 Feb 2010)
New Revision: 1308
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/controllers/administration.py
Log:
* waskaweb/controllers/administration.py: Fix formatting.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-02-08 11:38:09 UTC (rev 1307)
+++ wasko/branches/2.0/ChangeLog 2010-02-08 11:40:14 UTC (rev 1308)
@@ -1,3 +1,7 @@
+2010-02-08 Bernhard Herzog <bh at intevation.de>
+
+ * waskaweb/controllers/administration.py: Fix formatting.
+
2010-02-08 Torsten Irländer <torsten.irlaender at intevation.de>
* mpulsweb/templates,
Modified: wasko/branches/2.0/waskaweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/administration.py 2010-02-08 11:38:09 UTC (rev 1307)
+++ wasko/branches/2.0/waskaweb/controllers/administration.py 2010-02-08 11:40:14 UTC (rev 1308)
@@ -1,27 +1,27 @@
# -*- coding: utf-8 -*-
#
# Copyright 2007, 2008, 2010 Intevation GmbH, Germany, <info at intevation.de>
-#
-# This file is part of mpuls WASKA (CoMPUter-based case fiLeS -
+#
+# This file is part of mpuls WASKA (CoMPUter-based case fiLeS -
# Web-Anwendungs-Server fuer Kompetenzagenturen).
-#
+#
# mpuls WASKA is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
-#
+#
# mpuls WASKA is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
-#
+#
# You should have received a copy of the GNU Affero General Public
# License along with mpuls WASKA. If not, see <http://www.gnu.org/licenses/>.
-#
-# mpuls WASKA has been developed on behalf of the
+#
+# mpuls WASKA has been developed on behalf of the
# Projekttraeger im Deutschen Zentrum fuer Luft- und Raumfahrt e.V. (PT-DLR)
# within the programme Kompetenzagenturen (Durchfuehrungsphase) funded by
-# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and
+# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and
# European Social Fund resources.
#
# Authors:
@@ -30,62 +30,72 @@
#
import logging
+
import formencode
+from formencode import htmlfill
-from formencode import htmlfill
-from waskaweb.lib.base import *
-from mpulsweb.lib.security import getDbName
-from waskaweb.lib.validators import ValidatorStateObject, NewUserForm, EditUserForm, NewPasswordForm, EditSettingsForm, DeleteUserHelperForm, NewUserGroupForm, EditUserGroupForm
-from mpulsweb.model.user import UserObject, UserListObject, UserGroup, UserGroupList, UserGroupFactory
-from waskaweb.model.case import CaseOverview, CaseBundle
+from mpulsweb.lib.security import getDbName
+from mpulsweb.model.user import UserObject, UserListObject, UserGroup, \
+ UserGroupList, UserGroupFactory
+
+from waskaweb.lib.base import *
+from waskaweb.lib.validators import ValidatorStateObject, NewUserForm, \
+ EditUserForm, NewPasswordForm, EditSettingsForm, DeleteUserHelperForm, \
+ NewUserGroupForm, EditUserGroupForm
+from mpulsweb.lib.security import checkRole
+
+from waskaweb.model.case import CaseOverview, CaseBundle
from waskaweb.model.agencysettings import Agency
-from mpulsweb.lib.security import checkRole
+
log = logging.getLogger(__name__)
-RESET_PASSWORD_CONFIRM = _('adm_reset_user_password')
-RESET_PASSWORD_CONFIRM_QUESTION = _('adm_reset_user_password_question')
-DELETE_USER_NOTIFICATION_SUCCESS = _('adm_delete_user_success_header')
-DELETE_USER_NOTIFICATION_TEXT_SUCCESS = _('adm_delete_user_success_text')
+RESET_PASSWORD_CONFIRM = _('adm_reset_user_password')
+RESET_PASSWORD_CONFIRM_QUESTION = _('adm_reset_user_password_question')
-DELETE_SELFUSER_FAILURE = _('adm_delete_selfuser_notification_header')
-DELETE_SELFUSER_FAILURE_TEXT = _('adm_delete_selfuser_notification_text')
-DELETE_USER_NOTIFICATION = _('adm_delete_user_notification_header')
-DELETE_USER_NOTIFICATION_TEXT = _('adm_delete_user_notification_text')
-NEW_USER_FAILURE_HEADER = _('adm_delete_user_failure_header')
-NEW_USER_FAILURE_TEXT = _('adm_delete_user_failure_text')
-DELETE_USER_SUCCESS_HEADER = _('adm_delete_user_success_header')
-DELETE_USER_SUCCESS_TEXT = _('adm_delete_user_success_text')
+DELETE_USER_NOTIFICATION_SUCCESS = _('adm_delete_user_success_header')
+DELETE_USER_NOTIFICATION_TEXT_SUCCESS = _('adm_delete_user_success_text')
-NEW_USERGROUP_SUCCESS_HEADER = _('adm_new_usergroup_success_header')
-NEW_USERGROUP_SUCCESS_TEXT = _('adm_new_usergroup_success_text')
-NEW_USERGROUP_FAILURE_HEADER = _('adm_new_usergroup_failure_header')
-NEW_USERGROUP_FAILURE_TEXT = _('adm_new_usergroup_failure_text')
-EDIT_USERGROUP_SUCCESS_HEADER = _('adm_edit_usergroup_header')
-EDIT_USERGROUP_SUCCESS_TEXT = _('adm_edit_usergroup_text')
-DELETE_USERGROUP_CONFIRM = _('adm_delete_usergroup_confirm_header')
-DELETE_USERGROUP_CONFIRM_QUESTION = _('adm_delete_usergroup_confirm_text')
-DELETE_USERGROUP_SUCCESS_HEADER = _('adm_delete_usergroup_success_header')
-DELETE_USERGROUP_SUCCESS_TEXT = _('adm_delete_usergroup_success_text')
-DELETE_USERGROUP_FAILED_HEADER = _('adm_delete_usergroup_failure_header')
-DELETE_USERGROUP_FAILED_TEXT = _('adm_delete_usergroup_failure_text')
+DELETE_SELFUSER_FAILURE = _('adm_delete_selfuser_notification_header')
+DELETE_SELFUSER_FAILURE_TEXT = _('adm_delete_selfuser_notification_text')
+DELETE_USER_NOTIFICATION = _('adm_delete_user_notification_header')
+DELETE_USER_NOTIFICATION_TEXT = _('adm_delete_user_notification_text')
+NEW_USER_FAILURE_HEADER = _('adm_delete_user_failure_header')
+NEW_USER_FAILURE_TEXT = _('adm_delete_user_failure_text')
+DELETE_USER_SUCCESS_HEADER = _('adm_delete_user_success_header')
+DELETE_USER_SUCCESS_TEXT = _('adm_delete_user_success_text')
-DELETE_USER_CONFIRM = _('adm_delete_user_confirm_header')
-DELETE_USER_CONFIRM_QUESTION = _('adm_delete_user_confirm_text')
+NEW_USERGROUP_SUCCESS_HEADER = _('adm_new_usergroup_success_header')
+NEW_USERGROUP_SUCCESS_TEXT = _('adm_new_usergroup_success_text')
+NEW_USERGROUP_FAILURE_HEADER = _('adm_new_usergroup_failure_header')
+NEW_USERGROUP_FAILURE_TEXT = _('adm_new_usergroup_failure_text')
+EDIT_USERGROUP_SUCCESS_HEADER = _('adm_edit_usergroup_header')
+EDIT_USERGROUP_SUCCESS_TEXT = _('adm_edit_usergroup_text')
+DELETE_USERGROUP_CONFIRM = _('adm_delete_usergroup_confirm_header')
+DELETE_USERGROUP_CONFIRM_QUESTION = _('adm_delete_usergroup_confirm_text')
+DELETE_USERGROUP_SUCCESS_HEADER = _('adm_delete_usergroup_success_header')
+DELETE_USERGROUP_SUCCESS_TEXT = _('adm_delete_usergroup_success_text')
+DELETE_USERGROUP_FAILED_HEADER = _('adm_delete_usergroup_failure_header')
+DELETE_USERGROUP_FAILED_TEXT = _('adm_delete_usergroup_failure_text')
-DIALOG_CONFIRM_SETEDITOR = _('adm_set_editor_header')
-SETEDITOR_NOTIFICATION_SUCCESS = _('adm_set_editor_success_text')
-SETEDITOR_NOTIFICATION_SUCCESS_REST = _('adm_set_editor_success_text_rest')
-SETEDITOR_NOTIFICATION_SUCCESS_HEAD = _('adm_set_editor_success_text_head')
-SETEDITOR_NOTIFICATION_SUCCESS_REST_HEAD= _('adm_set_editor_success_text_rest_head')
+DELETE_USER_CONFIRM = _('adm_delete_user_confirm_header')
+DELETE_USER_CONFIRM_QUESTION = _('adm_delete_user_confirm_text')
-EDIT_USER_SUCCESS_HEADER = _('adm_edit_user_header')
-EDIT_USER_SUCCESS_TEXT = _('adm_edit_user_text')
+DIALOG_CONFIRM_SETEDITOR = _('adm_set_editor_header')
+SETEDITOR_NOTIFICATION_SUCCESS = _('adm_set_editor_success_text')
+SETEDITOR_NOTIFICATION_SUCCESS_REST = _('adm_set_editor_success_text_rest')
+SETEDITOR_NOTIFICATION_SUCCESS_HEAD = _('adm_set_editor_success_text_head')
+SETEDITOR_NOTIFICATION_SUCCESS_REST_HEAD = \
+ _('adm_set_editor_success_text_rest_head')
-EDIT_AGENCY_SUCCESS_HEADER = _('adm_edit_agency_header')
-EDIT_AGENCY_SUCCESS_TEXT = _('adm_edit_agency_text')
+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(BaseController):
def index(self):
@@ -109,10 +119,10 @@
@checkRole('admin_ka')
def overviewUserGroups(self):
# Get gid of usergroups so we can filter them out.
- user = UserListObject()
- filter = [u.gid for u in user.getUserList()]
+ user = UserListObject()
+ filter = [u.gid for u in user.getUserList()]
- list = UserGroupList()
+ list = UserGroupList()
c.group_overview = list.getGroupList(filter)
return render('/administration/overview_usergroups.mako')
@@ -135,18 +145,18 @@
@checkRole('admin_ka')
def editUserGroup(self, id=None):
- id = self._checkInt(id)
- factory = UserGroupFactory()
- group = factory.load(id)
- memberlist = group.getUser().getUserList()
+ id = self._checkInt(id)
+ factory = UserGroupFactory()
+ group = factory.load(id)
+ memberlist = group.getUser().getUserList()
c.form_errors = {}
c.form_result = {'name': group.name,
'id': group.id,
'standin': [user.id for user in memberlist]}
- c.group = group
- userlist = UserListObject()
- admins = userlist.getAdminList()
- c.userlist = userlist.getUserList(filter = [u.id for u in admins])
+ c.group = group
+ userlist = UserListObject()
+ admins = userlist.getAdminList()
+ c.userlist = userlist.getUserList(filter=[u.id for u in admins])
form = render('/administration/edit_usergroup.mako')
return htmlfill.render(unicode(form, 'utf-8'),
c.form_result,
@@ -155,11 +165,11 @@
@checkRole('admin_ka')
def editUserGroupAction(self):
- validator = EditUserGroupForm()
- factory = UserGroupFactory()
- userlist = UserListObject()
- admins = userlist.getAdminList()
- c.userlist = userlist.getUserList(filter = [u.id for u in admins])
+ validator = EditUserGroupForm()
+ factory = UserGroupFactory()
+ userlist = UserListObject()
+ admins = userlist.getAdminList()
+ c.userlist = userlist.getUserList(filter=[u.id for u in admins])
try:
try:
state = ValidatorStateObject
@@ -170,10 +180,10 @@
group.setData(form_result)
group.setUser(form_result.get('standin'))
group.store()
- c.group = group
- c.success_for = EDIT_USERGROUP_SUCCESS_HEADER
- c.success_text = EDIT_USERGROUP_SUCCESS_TEXT
- c.url_ok = "/administration/overviewUserGroups"
+ c.group = group
+ c.success_for = EDIT_USERGROUP_SUCCESS_HEADER
+ c.success_text = EDIT_USERGROUP_SUCCESS_TEXT
+ c.url_ok = "/administration/overviewUserGroups"
return render('/administration/dialogs/success_edit_usergroup.mako')
except formencode.Invalid, error:
c.form_result = error.value
@@ -193,7 +203,7 @@
c.form_errors = {}
c.form_result = {}
c.uo = UserObject(id)
- return render('/administration/edit_user.mako')
+ return render('/administration/edit_user.mako')
@checkRole('admin_ka')
def resetUserPassword(self, id=None, confirmed='0'):
@@ -207,12 +217,13 @@
except:
return render('/tests/trace.mako')
else:
- c.context = "../main.mako"
- c.confirm_for = RESET_PASSWORD_CONFIRM
- c.question = "%s %s, %s" % (RESET_PASSWORD_CONFIRM_QUESTION, c.uo.last_name, c.uo.first_name)
-
+ c.context = "../main.mako"
+ c.confirm_for = RESET_PASSWORD_CONFIRM
+ c.question = "%s %s, %s" % (RESET_PASSWORD_CONFIRM_QUESTION,
+ c.uo.last_name, c.uo.first_name)
+
c.url_yes = "/administration/resetUserPassword/%s/1" % id
- c.url_no = "/administration/showUser/%s" % id
+ c.url_no = "/administration/showUser/%s" % id
return render('/administration/dialogs/confirm_resetpassword.mako')
@checkRole('admin_ka')
@@ -229,7 +240,7 @@
@checkRole('admin_ka')
def editUserAction(self):
- validator = EditUserForm()
+ validator = EditUserForm()
try:
try:
uid = request.params['uid']
@@ -237,11 +248,11 @@
form_result = validator.to_python(request.params)
c.uo.setData(form_result)
c.uo.store()
- c.success_for = EDIT_USER_SUCCESS_HEADER
- c.success_text = EDIT_USER_SUCCESS_TEXT
- c.url_ok = "/administration/overviewUser"
+ c.success_for = EDIT_USER_SUCCESS_HEADER
+ c.success_text = EDIT_USER_SUCCESS_TEXT
+ c.url_ok = "/administration/overviewUser"
return render('/administration/dialogs/success_edit_user.mako')
- #return self.overviewUser()
+ #return self.overviewUser()
except formencode.Invalid, error:
c.form_result = error.value
c.form_errors = error.error_dict or {}
@@ -252,35 +263,35 @@
@checkRole('admin_ka')
def createUserGroupAction(self):
- factory = UserGroupFactory()
- validator = NewUserGroupForm()
+ factory = UserGroupFactory()
+ validator = NewUserGroupForm()
try:
try:
- c.form_result = validator.to_python(request.params)
- c.ugo = factory.create(c.form_result.get('name'))
- c.success_for = NEW_USERGROUP_SUCCESS_HEADER
+ c.form_result = validator.to_python(request.params)
+ c.ugo = factory.create(c.form_result.get('name'))
+ c.success_for = NEW_USERGROUP_SUCCESS_HEADER
c.success_text = NEW_USERGROUP_SUCCESS_TEXT
- c.url_ok = "/administration/overviewUserGroups"
+ c.url_ok = "/administration/overviewUserGroups"
return render('/administration/dialogs/success_new_usergroup.mako')
except formencode.Invalid, error:
c.form_result = error.value
c.form_errors = error.error_dict or {}
form = render('/administration/new_usergroup.mako')
- return htmlfill.render(unicode(form, 'utf-8'),
+ return htmlfill.render(unicode(form, 'utf-8'),
c.form_result,
c.form_errors,
auto_insert_errors=False)
except:
- c.failed_for = NEW_USERGROUP_FAILURE_HEADER
- c.failed_text = NEW_USERGOUP_FAILURE_TEXT
- c.url_ok = "/administration/overviewUserGroups"
+ c.failed_for = NEW_USERGROUP_FAILURE_HEADER
+ c.failed_text = NEW_USERGOUP_FAILURE_TEXT
+ c.url_ok = "/administration/overviewUserGroups"
return render('/administration/dialogs/failed_new_usergroup.mako')
except:
return render('/tests/trace.mako')
@checkRole('admin_ka')
def createUserAction(self):
- validator = NewUserForm()
+ validator = NewUserForm()
c.user_password = None
try:
try:
@@ -295,19 +306,21 @@
c.uo.setData(c.form_result)
# create user
c.user_password = c.uo.createLogin(login, role, agency)
- return render('/administration/new_user_result.mako')
+ return render('/administration/new_user_result.mako')
except formencode.Invalid, error:
c.form_result = error.value
c.form_errors = error.error_dict or {}
form = render('/administration/new_user.mako')
- return htmlfill.render(unicode(form, 'utf-8'), c.form_result, c.form_errors, auto_insert_errors=False)
+ return htmlfill.render(unicode(form, 'utf-8'),
+ c.form_result, c.form_errors,
+ auto_insert_errors=False)
except:
- c.failed_for = NEW_USER_FAILURE_HEADER
- c.failed_text = NEW_USER_FAILURE_TEXT
+ c.failed_for = NEW_USER_FAILURE_HEADER
+ c.failed_text = NEW_USER_FAILURE_TEXT
return render('/tests/trace.mako')
- c.url_ok = "/administration/overviewUser"
+ c.url_ok = "/administration/overviewUser"
return render('/administration/dialogs/failed_new_user.mako')
-
+
except:
return render('/tests/trace.mako')
#return "Es ist ein Fehler beim Speichern des Benutzers aufgetreten."
@@ -321,22 +334,22 @@
ugo = factory.load(id)
if confirmed:
ugo.delete()
- c.success_for = DELETE_USERGROUP_SUCCESS_HEADER
+ c.success_for = DELETE_USERGROUP_SUCCESS_HEADER
c.success_text = DELETE_USERGROUP_SUCCESS_TEXT
- c.url_ok = "/administration/overviewUserGroups"
+ c.url_ok = "/administration/overviewUserGroups"
return render('/administration/dialogs/success_deletegroup_user.mako')
else:
- c.context = "../main.mako"
+ c.context = "../main.mako"
c.confirm_for = DELETE_USERGROUP_CONFIRM
- c.question = DELETE_USERGROUP_CONFIRM_QUESTION
- c.url_yes = "/administration/deleteUserGroup/%s/1" % ugo.id
- c.url_no = "/administration/overviewUserGroups/"
+ c.question = DELETE_USERGROUP_CONFIRM_QUESTION
+ c.url_yes = "/administration/deleteUserGroup/%s/1" % ugo.id
+ c.url_no = "/administration/overviewUserGroups/"
return render('/administration/dialogs/confirm_deleteusergroup.mako')
except:
return render('tests/trace.mako')
- c.failed_for = DELETE_USERGROUP_FAILED_HEADER
+ c.failed_for = DELETE_USERGROUP_FAILED_HEADER
c.failed_text = DELETE_USERGROUP_FAILED_TEXT
- c.url_ok = "/administration/overviewUserGroups"
+ c.url_ok = "/administration/overviewUserGroups"
return render('/administration/dialogs/failed_new_usergroup.mako')
@checkRole('admin_ka')
@@ -347,9 +360,9 @@
uo = UserObject(id)
# Make sure that the user can not delete himself
if uo.id == session.get('USER_AUTHORIZED').id:
- c.failed_for = DELETE_SELFUSER_FAILURE
- c.failed_text = DELETE_SELFUSER_FAILURE_TEXT
- c.url_ok = "/administration/overviewUser"
+ c.failed_for = DELETE_SELFUSER_FAILURE
+ c.failed_text = DELETE_SELFUSER_FAILURE_TEXT
+ c.url_ok = "/administration/overviewUser"
return render('/administration/dialogs/failed_delete_user.mako')
if confirmed:
@@ -357,9 +370,11 @@
# he is an editor then raise a dialog which allows the user to
# transfer the cases.
overview = CaseOverview()
- overview.search('editor:%s;state:1;state:2;state:3;state:4;state:5' % uo.id)
+ overview.search('editor:%s;'
+ 'state:1;state:2;state:3;state:4;state:5'
+ % uo.id)
if overview.getDatasets():
- list = UserListObject()
+ list = UserListObject()
filter = [u.id for u in list.getAdminList()]
filter.append(uo.id) #the user we want to delete
c.user_list = list.getUserList(filter)
@@ -368,52 +383,62 @@
return render('/administration/delete_user_helper.mako')
else:
uo.delete()
- c.notification_for = DELETE_USER_NOTIFICATION_SUCCESS
+ c.notification_for = DELETE_USER_NOTIFICATION_SUCCESS
c.notification_text = DELETE_USER_NOTIFICATION_TEXT_SUCCESS
- c.success_for = DELETE_USER_SUCCESS_HEADER
+ c.success_for = DELETE_USER_SUCCESS_HEADER
c.success_text = DELETE_USER_SUCCESS_TEXT
c.url_ok = "/administration/overviewUser"
return render('/administration/dialogs/success_delete_user.mako')
else:
- c.context = "../main.mako"
- c.confirm_for = DELETE_USER_CONFIRM
- c.question = DELETE_USER_CONFIRM_QUESTION % (uo.last_name, uo.first_name, uo.login)
+ c.context = "../main.mako"
+ c.confirm_for = DELETE_USER_CONFIRM
+ c.question = DELETE_USER_CONFIRM_QUESTION % (uo.last_name,
+ uo.first_name,
+ uo.login)
c.url_yes = "/administration/deleteUser/%s/1" % id
- c.url_no = "/administration/overviewUser/"
+ c.url_no = "/administration/overviewUser/"
return render('/administration/dialogs/confirm_deleteuser.mako')
except:
return render('/tests/trace.mako')
@checkRole('admin_ka')
def deleteUserHelper(self):
- validator = DeleteUserHelperForm()
- all_cases = CaseOverview()
- c.notification_for = DIALOG_CONFIRM_SETEDITOR
- c.form_errors = {}
- c.form_result = {}
+ validator = DeleteUserHelperForm()
+ all_cases = CaseOverview()
+ c.notification_for = DIALOG_CONFIRM_SETEDITOR
+ c.form_errors = {}
+ c.form_result = {}
try:
- data = formencode.variabledecode.variable_decode(request.params)
+ data = formencode.variabledecode.variable_decode(request.params)
form_result = validator.to_python(data)
case_bundle = CaseBundle(form_result.get('case_id', []))
- new_editor = UserObject(form_result.get('editor'))
- del_user = UserObject(form_result.get('user_id'))
- all_cases.search('editor:%s;state:1;state:2;state:3;state:4;state:5' % del_user.id)
- num = case_bundle.setEditor(form_result.get('editor'))
- rest = all_cases.numDatasets() - case_bundle.numDatasets()
- c.url_ok = "/administration/deleteUser/%s/1" % form_result.get('user_id')
+ new_editor = UserObject(form_result.get('editor'))
+ del_user = UserObject(form_result.get('user_id'))
+ all_cases.search('editor:%s;state:1;state:2;state:3;state:4;state:5'
+ % del_user.id)
+ num = case_bundle.setEditor(form_result.get('editor'))
+ rest = all_cases.numDatasets() - case_bundle.numDatasets()
+ c.url_ok = ("/administration/deleteUser/%s/1"
+ % form_result.get('user_id'))
c.success_for = SETEDITOR_NOTIFICATION_SUCCESS_HEAD
if rest > 0:
c.success_for = SETEDITOR_NOTIFICATION_SUCCESS_REST_HEAD
- c.success_text = SETEDITOR_NOTIFICATION_SUCCESS_REST % (new_editor.first_name, new_editor.last_name, del_user.first_name, del_user.last_name)
+ c.success_text = (SETEDITOR_NOTIFICATION_SUCCESS_REST
+ % (new_editor.first_name,
+ new_editor.last_name,
+ del_user.first_name, del_user.last_name))
else:
c.success_for = SETEDITOR_NOTIFICATION_SUCCESS_HEAD
- c.success_text = SETEDITOR_NOTIFICATION_SUCCESS % (new_editor.first_name, new_editor.last_name, del_user.first_name, del_user.last_name)
+ c.success_text = (SETEDITOR_NOTIFICATION_SUCCESS
+ % (new_editor.first_name,
+ new_editor.last_name,
+ del_user.first_name, del_user.last_name))
return render('/administration/dialogs/notificate_delete_user_helper.mako')
except formencode.Invalid, error:
return self.deleteUser(form_result.get('user_id'), '1')
-
+
@checkRole('admin_ka')
def showSettings(self):
c.form_errors = {}
@@ -437,7 +462,7 @@
@checkRole('admin_ka')
def editSettingsAction(self):
validator = EditSettingsForm()
- c.agency = Agency()
+ c.agency = Agency()
try:
c.form_result = validator.to_python(request.params)
except formencode.Invalid, error:
@@ -446,16 +471,16 @@
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"
+ 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()
@checkRole('admin_ka')
def viewPrivacyStatement(self):
agency = Agency()
- statement = agency.getPrivacyStatement()
+ statement = agency.getPrivacyStatement()
return statement
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list