addRoleAssignment( [ Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_ASSISTANT ], [ 'fetchGrid', 'fetchCategory', 'fetchRow', 'addFile', 'downloadFile', 'deleteFile', 'updateFinalDraftFiles' ] ); // Set the grid title. $this->setTitle('submission.finalDraft'); } // // Public handler methods // /** * Save 'manage final draft files' form * * @param array $args * @param PKPRequest $request * * @return JSONMessage JSON object */ public function updateFinalDraftFiles($args, $request) { $submission = $this->getSubmission(); $manageFinalDraftFilesForm = new ManageFinalDraftFilesForm($submission->getId()); $manageFinalDraftFilesForm->readInputData(); if ($manageFinalDraftFilesForm->validate()) { $manageFinalDraftFilesForm->execute( $this->getGridCategoryDataElements($request, $this->getStageId()) ); // Let the calling grid reload itself return \PKP\db\DAO::getDataChangedEvent(); } else { return new JSONMessage(false); } } }