Ignore:
Timestamp:
22 Feb 2014, 15:46:03 (11 years ago)
Author:
uli
Message:

Merge changes from uli-diazo-themed back into trunk. If this works, then a miracle happened.

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk

  • main/waeup.kofa/trunk/src/waeup/kofa

  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.py

    r9637 r11254  
    2222from zope.component import getUtility
    2323from hurry.workflow.interfaces import InvalidTransitionError
    24 from waeup.kofa.browser.resources import datatable
    2524from waeup.kofa.browser.layout import KofaPage, KofaAddFormPage, NullValidator
    2625from waeup.kofa.browser.breadcrumbs import Breadcrumb
     
    5251            return
    5352        if not batches:
    54             self.flash(_('No batch selected.'))
     53            self.flash(_('No batch selected.'), type='warning')
    5554            return
    5655        if isinstance(batches, basestring):
     
    102101    @action(_('Cancel'), validator=NullValidator)
    103102    def cancel(self, *args, **kw):
    104         self.flash(_('Batch creation cancelled.'))
     103        self.flash(_('Batch creation cancelled.'), type='warning')
    105104        self.redirect(self.url(self.context))
    106105
     
    120119    def update(self, filenames=None, reimport=None, cancel=None):
    121120        if cancel is not None:
    122             self.flash(_('Reimport cancelled.'))
     121            self.flash(_('Reimport cancelled.'), type='warning')
    123122            self.redirect(self.url(self.context))
    124123            return
     
    126125            return
    127126        if not filenames:
    128             self.flash(_('No file chosen. Action cancelled.'))
     127            self.flash(_('No file chosen. Action cancelled.'), type='warning')
    129128            self.redirect(self.url(self.context))
    130129            return
     
    137136            except KeyError:
    138137                self.flash(_('This batch already exists: ${a}',
    139                     mapping = {'a':filename}))
     138                    mapping = {'a':filename}), type='warning')
    140139                continue
    141140            self.flash(_('Successfully reimported: ${a}',
     
    156155    disable_button = _('Disable ACs')
    157156    enable_button = _('Enable ACs')
     157    cancel_button = _('Cancel Search')
    158158
    159159    def update(self, *args, **kw):
    160         datatable.need()
    161160        form = self.request.form
     161        if 'cancel' in form:
     162            self.redirect(self.url(self.context))
     163            return
    162164        self.hitlist = []
    163165        if 'searchterm' in form and form['searchterm']:
     
    187189                except InvalidTransitionError:
    188190                    self.flash(_('${a}: Disable transition not allowed.',
    189                         mapping = {'a':entry}))
     191                        mapping = {'a':entry}), type='danger')
    190192            elif 'enable' in form:
    191193                try:
     
    196198                    self.context.logger_info(ob_class, message)
    197199                except InvalidTransitionError:
    198                     self.flash(_('${a}: Re-enable transition not allowed.', mapping = {'a':entry}))
     200                    self.flash(_('${a}: Re-enable transition not allowed.',
     201                               mapping = {'a':entry}), type='danger')
    199202        self.hitlist = search(query=self.searchterm,
    200203            searchtype=self.searchtype, view=self)
Note: See TracChangeset for help on using the changeset viewer.