/** * Show the form to allow the user to select files from previous stages * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function selectFiles($args, $request) { $submission = $this->getSubmission(); $publicationFormat = $this->getAuthorizedContextObject(ASSOC_TYPE_PUBLICATION_FORMAT); import('lib.pkp.controllers.grid.files.proof.form.ManageProofFilesForm'); $manageProofFilesForm = new ManageProofFilesForm($submission->getId(), $publicationFormat->getId()); $manageProofFilesForm->initData($args, $request); return new JSONMessage(true, $manageProofFilesForm->fetch($request)); }
/** * Save 'manage proof files' form * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function updateProofFiles($args, $request) { $submission = $this->getSubmission(); $representation = $this->getAuthorizedContextObject(ASSOC_TYPE_REPRESENTATION); import('lib.pkp.controllers.grid.files.proof.form.ManageProofFilesForm'); $manageProofFilesForm = new ManageProofFilesForm($submission->getId(), $representation->getId()); $manageProofFilesForm->readInputData(); if ($manageProofFilesForm->validate()) { $manageProofFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId()), SUBMISSION_FILE_PROOF); // Let the calling grid reload itself return DAO::getDataChangedEvent(); } else { return new JSONMessage(false); } }
/** * Show the form to allow the user to select files from previous stages * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function selectFiles($args, $request) { $submission = $this->getSubmission(); $representationDao = Application::getRepresentationDAO(); $representation = $representationDao->getById($request->getUserVar('representationId'), $submission->getId()); import('lib.pkp.controllers.grid.files.proof.form.ManageProofFilesForm'); $manageProofFilesForm = new ManageProofFilesForm($submission->getId(), $representation->getId()); $manageProofFilesForm->initData($args, $request); return new JSONMessage(true, $manageProofFilesForm->fetch($request)); }