/** * 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) { import('lib.pkp.controllers.grid.files.copyedit.form.ManageCopyeditFilesForm'); $manageCopyeditFilesForm = new ManageCopyeditFilesForm($this->getSubmission()->getId()); $manageCopyeditFilesForm->initData($args, $request); return new JSONMessage(true, $manageCopyeditFilesForm->fetch($request)); }
/** * Save 'manage copyedited files' form * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function updateCopyeditFiles($args, $request) { $submission = $this->getSubmission(); import('lib.pkp.controllers.grid.files.copyedit.form.ManageCopyeditFilesForm'); $manageCopyeditFilesForm = new ManageCopyeditFilesForm($submission->getId()); $manageCopyeditFilesForm->readInputData(); if ($manageCopyeditFilesForm->validate()) { $manageCopyeditFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId())); // Let the calling grid reload itself return DAO::getDataChangedEvent(); } else { return new JSONMessage(false); } }
/** * Save 'manage copyedited files' form * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function updateCopyeditFiles($args, $request) { $submission = $this->getSubmission(); import('lib.pkp.controllers.grid.files.copyedit.form.ManageCopyeditFilesForm'); $manageCopyeditFilesForm = new ManageCopyeditFilesForm($submission->getId()); $manageCopyeditFilesForm->readInputData(); if ($manageCopyeditFilesForm->validate()) { $manageCopyeditFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId())); $notificationMgr = new NotificationManager(); $notificationMgr->updateNotification($request, array(NOTIFICATION_TYPE_ASSIGN_COPYEDITOR, NOTIFICATION_TYPE_AWAITING_COPYEDITS), null, ASSOC_TYPE_SUBMISSION, $submission->getId()); // Let the calling grid reload itself return DAO::getDataChangedEvent(); } else { return new JSONMessage(false); } }