Changeset 7488 for main/waeup.sirp/trunk/src
- Timestamp:
- 20 Jan 2012, 07:54:38 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.py
r7467 r7488 22 22 from hurry.workflow.interfaces import InvalidTransitionError 23 23 from waeup.sirp.browser.resources import datatable 24 from waeup.sirp.browser import SIRPPage, SIRPAddFormPage 24 from waeup.sirp.browser import SIRPPage, SIRPAddFormPage, NullValidator 25 25 from waeup.sirp.browser.breadcrumbs import Breadcrumb 26 26 from waeup.sirp.browser.viewlets import ( … … 73 73 'prefix', 'entry_num', 'cost') 74 74 75 @action('Cancel') 76 def cancel(self, *args, **kw): 77 self.flash('Batch creation cancelled.') 78 self.redirect(self.url(self.context)) 79 80 @action('Create batch') 75 @action('Create batch', style='primary') 81 76 def createBatch(self, **data): 82 77 creator = self.request.principal.id … … 88 83 self.flash('Batch created (%s entries)' % data['entry_num']) 89 84 self.flash('Data written to %s' % csv_file) 85 self.redirect(self.url(self.context)) 86 87 @action('Cancel', validator=NullValidator) 88 def cancel(self, *args, **kw): 89 self.flash('Batch creation cancelled.') 90 90 self.redirect(self.url(self.context)) 91 91 … … 179 179 parent_viewname = 'administration' 180 180 181 class BatchContainerSearchBreadcrumb(Breadcrumb):182 """A breadcrumb for ac batch containers search page.183 """184 grok.require('waeup.manageACBatches')185 grok.context(IAccessCodeBatchContainer)186 grok.name('search')187 title = u'Search Access Codes'188 viewname = 'search'189 parent_viewname = 'index'181 #class BatchContainerSearchBreadcrumb(Breadcrumb): 182 # """A breadcrumb for ac batch containers search page. 183 # """ 184 # grok.require('waeup.manageACBatches') 185 # grok.context(IAccessCodeBatchContainer) 186 # grok.name('search') 187 # title = u'Search Access Codes' 188 # viewname = 'search' 189 # parent_viewname = 'index' 190 190 191 191 class AdminTaskManageACBatches(AdminTask):
Note: See TracChangeset for help on using the changeset viewer.