Exemplo n.º 1
0
 def handleUndo(self, action):
     data, errors = self.extractData()
     ids = self.request.get('ids', [])
     if errors:
         IStatusMessage(self.request).add(self.formErrorsMessage, 'warning')
     elif not ids:
         IStatusMessage(self.request).add(_(u'You must select transactions'), 'warning')
     else:
         try:
             self.undoAllTransactions(ids)
             IStatusMessage(self.request).add(_(u'Selected transactions has been undoed'))
         except Exception, e:
             logger.warning('Error upon undo:', exc_info=True)
             IStatusMessage(self.request).add(_(u'Error upon undo: %s' % e), 'warning')
         self.redirect(self.request.getURL())
Exemplo n.º 2
0
 def query(self, default=None):
     return self.content.get('request_info', _(u'[Unknown]'))
Exemplo n.º 3
0
 def query(self, default=None):
     return self.content.get('size', _(u'[No size]'))
Exemplo n.º 4
0
 def query(self, default=None):
     return self.content.get('location', _(u'[Unknown]'))
Exemplo n.º 5
0
 def query(self, default=None):
     return self.content.get('description', _(u'[No description]'))