Ignore:
Timestamp:
20 Jan 2012, 07:54:38 (13 years ago)
Author:
Henrik Bettermann
Message:

Some button adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.py

    r7467 r7488  
    2222from hurry.workflow.interfaces import InvalidTransitionError
    2323from waeup.sirp.browser.resources import datatable
    24 from waeup.sirp.browser import SIRPPage, SIRPAddFormPage
     24from waeup.sirp.browser import SIRPPage, SIRPAddFormPage, NullValidator
    2525from waeup.sirp.browser.breadcrumbs import Breadcrumb
    2626from waeup.sirp.browser.viewlets import (
     
    7373        'prefix', 'entry_num', 'cost')
    7474
    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')
    8176    def createBatch(self, **data):
    8277        creator = self.request.principal.id
     
    8883        self.flash('Batch created (%s entries)' % data['entry_num'])
    8984        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.')
    9090        self.redirect(self.url(self.context))
    9191
     
    179179    parent_viewname = 'administration'
    180180
    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'
    190190
    191191class AdminTaskManageACBatches(AdminTask):
Note: See TracChangeset for help on using the changeset viewer.