예제 #1
0
 def _process( self ):
     if self._action == "CANCEL":
         self._redirect(urlHandlers.UHAbstractManagment.getURL(self._target))
     elif self._action == "VALIDATE":
         return self._doValidate()
     else:
         if isinstance( self._abstract.getCurrentStatus(), review.AbstractStatusAccepted ):
             raise NoReportError(_("The abstract with id '%s' cannot be edited because it has already been accepted.") % self._abstract.getId())
         p = abstracts.WPModEditData(self, self._target, self._abstractData)
         pars = self._abstractData.toDict()
         return p.display(**pars)
예제 #2
0
 def _process(self):
     if self._action == "UPDATE":
         if not self._abstractData.hasErrors():
             self._abstractData.updateAbstract(self._target)
             self._redirect(
                 urlHandlers.UHAbstractManagment.getURL(self._target))
             return
     elif self._action == "CANCEL":
         self._redirect(urlHandlers.UHAbstractManagment.getURL(
             self._target))
         return
     p = abstracts.WPModEditData(self, self._target, self._abstractData)
     return p.display()
예제 #3
0
 def _doValidate( self ):
     #First, one must validate that the information is fine
     errors = self._abstractData.check()
     if errors:
         p = abstracts.WPModEditData(self, self._target, self._abstractData)
         pars = self._abstractData.toDict()
         pars["errors"] = errors
         pars["action"] = self._action
         # restart the current value of the param attachments to show the existing files
         pars["attachments"] = self._abstract.getAttachments().values()
         return p.display( **pars )
     self._abstract.clearAuthors()
     #self._setAbstractData(self._abstract)
     self._abstractData.setAbstractData(self._abstract)
     self._redirect(urlHandlers.UHAbstractManagment.getURL(self._target))