web/views/basecontrollers.py
changeset 8084 e22c17e1710d
parent 8056 8909800a8c51
child 8116 6510654269a6
equal deleted inserted replaced
8083:3db2f3317d15 8084:e22c17e1710d
   576 class MailBugReportController(Controller):
   576 class MailBugReportController(Controller):
   577     __regid__ = 'reportbug'
   577     __regid__ = 'reportbug'
   578     __select__ = match_form_params('description')
   578     __select__ = match_form_params('description')
   579 
   579 
   580     def publish(self, rset=None):
   580     def publish(self, rset=None):
   581         body = self._cw.form['description']
   581         req = self._cw
   582         self.sendmail(self._cw.config['submit-mail'],
   582         self.sendmail(req.vreg.config['submit-mail'],
   583                       self._cw._('%s error report') % self._cw.config.appid,
   583                       req._('%s error report') % req.vreg.config.appid,
   584                       body)
   584                       req.form['description'])
   585         url = self._cw.build_url(__message=self._cw._('bug report sent'))
   585         raise Redirect(req.build_url(__message=req._('bug report sent')))
   586         raise Redirect(url)
       
   587 
   586 
   588 
   587 
   589 class UndoController(Controller):
   588 class UndoController(Controller):
   590     __regid__ = 'undo'
   589     __regid__ = 'undo'
   591     __select__ = authenticated_user() & match_form_params('txuuid')
   590     __select__ = authenticated_user() & match_form_params('txuuid')