/**
  * Save an approved proof.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function saveApprovedProof($args, $request)
 {
     $submission = $this->getSubmission();
     $representationDao = Application::getRepresentationDAO();
     $representation = $representationDao->getById($request->getUserVar('representationId'), $submission->getId());
     import('controllers.grid.files.proof.form.ApprovedProofForm');
     $approvedProofForm = new ApprovedProofForm($submission, $representation, $request->getUserVar('fileId'));
     $approvedProofForm->readInputData();
     if ($approvedProofForm->validate()) {
         $approvedProofForm->execute($request);
         return DAO::getDataChangedEvent();
     }
     return new JSONMessage(true, $approvedProofForm->fetch($request));
 }
 /**
  * Save an approved proof.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function saveApprovedProof($args, $request)
 {
     import('controllers.grid.files.proof.form.ApprovedProofForm');
     $approvedProofForm = new ApprovedProofForm($this->monograph, $this->publicationFormat, $request->getUserVar('fileId'));
     $approvedProofForm->readInputData();
     if ($approvedProofForm->validate()) {
         $fileIdAndRevision = $approvedProofForm->execute($request);
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent($fileIdAndRevision);
     } else {
         return new JSONMessage(true, $approvedProofForm->fetch($request));
     }
 }