Ejemplo n.º 1
0
 /**
  * Update proof submission file pub ids.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateIdentifiers($args, $request)
 {
     $submissionFile = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION_FILE);
     $stageId = $request->getUserVar('stageId');
     import('controllers.tab.pubIds.form.PublicIdentifiersForm');
     $form = new PublicIdentifiersForm($submissionFile, $stageId);
     $form->readInputData();
     if ($form->validate($request)) {
         $form->execute($request);
         return DAO::getDataChangedEvent($submissionFile->getId());
     } else {
         return new JSONMessage(true, $form->fetch($request));
     }
 }
Ejemplo n.º 2
0
 /**
  * Update issue pub ids
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateIdentifiers($args, $request)
 {
     $issue = $this->getAuthorizedContextObject(ASSOC_TYPE_ISSUE);
     import('controllers.tab.pubIds.form.PublicIdentifiersForm');
     $form = new PublicIdentifiersForm($issue);
     $form->readInputData();
     if ($form->validate($request)) {
         $form->execute($request);
         return DAO::getDataChangedEvent($issue->getId());
     } else {
         return new JSONMessage(true, $form->fetch($request));
     }
 }
Ejemplo n.º 3
0
 /**
  * Update article pub ids.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateIdentifiers($args, $request)
 {
     import('controllers.tab.pubIds.form.PublicIdentifiersForm');
     $submission = $this->getSubmission();
     $stageId = $this->getStageId();
     $form = new PublicIdentifiersForm($submission, $stageId, array('displayedInContainer' => true));
     $form->readInputData();
     if ($form->validate($request)) {
         $form->execute($request);
         $json = new JSONMessage();
         import('lib.pkp.classes.log.SubmissionLog');
         import('classes.log.SubmissionEventLogEntry');
         // Log consts
         SubmissionLog::logEvent($request, $submission, SUBMISSION_LOG_ISSUE_METADATA_UPDATE, 'submission.event.publicIdentifiers');
         if ($request->getUserVar('displayedInContainer')) {
             $router = $request->getRouter();
             $dispatcher = $router->getDispatcher();
             $url = $dispatcher->url($request, ROUTE_COMPONENT, null, $this->_getHandlerClassPath(), 'fetch', null, array('submissionId' => $submission->getId(), 'stageId' => $stageId, 'tabPos' => $this->getTabPosition(), 'hideHelp' => true));
             $json->setAdditionalAttributes(array('reloadContainer' => true, 'tabsUrl' => $url));
             $json->setContent(true);
             // prevents modal closure
         }
         return $json;
     } else {
         return new JSONMessage(true, $form->fetch($request));
     }
 }
Ejemplo n.º 4
0
 /**
  * Update article galley pub ids
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateIdentifiers($args, $request)
 {
     $submission = $this->getSubmission();
     $representationDao = Application::getRepresentationDAO();
     $representation = $representationDao->getById($request->getUserVar('representationId'), $submission->getId());
     import('controllers.tab.pubIds.form.PublicIdentifiersForm');
     $form = new PublicIdentifiersForm($representation);
     $form->readInputData();
     if ($form->validate($request)) {
         $form->execute($request);
         return DAO::getDataChangedEvent();
     } else {
         return new JSONMessage(true, $form->fetch($request));
     }
 }