Changeset 4632 for waeup/branches/ulif-layout
- Timestamp:
- 2 Jan 2010, 14:06:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-layout/src/waeup/browser/pages.py
r4627 r4632 4 4 import grok 5 5 from waeup.browser import WAeUPPage, WAeUPEditFormPage 6 from waeup.interfaces import IUniversity, IWAeUPObject, IUserContainer 6 from waeup.interfaces import (IUniversity, IWAeUPObject, IUserContainer, 7 IUserAccount) 7 8 from waeup.widgets.interfaces import ITableProvider 8 9 from zope.app.security.interfaces import (IAuthentication, … … 114 115 115 116 class UserContainerPage(WAeUPPage): 117 """Overview page for all local users. 118 """ 116 119 grok.require('waeup.manageUsers') 117 120 grok.context(IUserContainer) … … 125 128 self.context.delUser(userid) 126 129 self.flash('User %s successfully deleted.' % userid) 130 131 class UserEditFormPage(WAeUPEditFormPage): 132 """Edit a user account. 133 """ 134 grok.context(IUserAccount) 135 grok.name('index') 136 137 form_fields = grok.AutoFields(IUserAccount) 138 grok.require('waeup.manageUsers') 139 140 title = "Edit user" 141 142 @grok.action('Save') 143 def save(self, **data): 144 self.applyData(self.context, **data) 145 self.flash('User settings have been saved.') 146 return 147 148 @grok.action('Save and return') 149 def saveAndReturn(self, **data): 150 self.applyData(self.context, **data) 151 self.flash('User settings have been saved.') 152 self.redirect(self.url(self.context.__parent__)) 153 return 154 155 @grok.action('Cancel') 156 def cancel(self, **data): 157 self.redirect(self.url(self.context.__parent__)) 158 return
Note: See TracChangeset for help on using the changeset viewer.