Changeset 4631 for waeup/branches
- Timestamp:
- 2 Jan 2010, 14:06:13 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-layout/src/waeup/users.py
r4629 r4631 64 64 formview_name = 'adduserform' # The name of the formview we want 65 65 # to be rendered in this viewlet. 66 67 68 class UserEditForm(grok.EditForm):69 grok.context(IUserAccount)70 form_fields = grok.AutoFields(IUserAccount)71 grok.require('waeup.manageUsers')72 73 @grok.action('Save')74 def save(self, **data):75 self.applyData(self.context, **data)76 self.flash('User was modified.')77 return78 79 @grok.action('Save and return')80 def saveAndReturn(self, **data):81 self.applyData(self.context, **data)82 self.flash('User was modified.')83 self.redirect(self.url(self.context.__parent__))84 return85 86 @grok.action('Cancel')87 def cancel(self, **data):88 self.redirect(self.url(self.context.__parent__))89 return90 91 92 class UserEditMain(FormWrapMixin, grok.Viewlet):93 """A viewlet that renders the `UserEditForm`.94 """95 grok.viewletmanager(MainArea)96 grok.context(IUserAccount)97 grok.view(Index)98 grok.require('waeup.manageUsers')99 100 formview_name = 'usereditform' # The name of the formview we want to101 # be rendered in this viewlet.
Note: See TracChangeset for help on using the changeset viewer.