/**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, &$request)
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId);
     $authorSubmission =& $this->submission;
     $this->setupTemplate(true, $articleId, 'summary');
     if ($authorSubmission->getStatus() != STATUS_PUBLISHED && $authorSubmission->getStatus() != STATUS_ARCHIVED) {
         $suppFileId = isset($args[0]) ? (int) $args[0] : 0;
         import('classes.submission.form.SuppFileForm');
         $journal =& $request->getJournal();
         $submitForm = new SuppFileForm($authorSubmission, $journal, $suppFileId);
         $submitForm->readInputData();
         if ($submitForm->validate()) {
             $submitForm->execute();
             Request::redirect(null, null, 'submission', $articleId);
         } else {
             $submitForm->display();
         }
     } else {
         Request::redirect(null, null, 'submission', $articleId);
     }
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, $request)
 {
     $articleId = $request->getUserVar('articleId');
     $submissionLayoutHandler = new SubmissionLayoutHandler();
     $submissionLayoutHandler->validate($articleId);
     $submission =& $submissionLayoutHandler->submission;
     $this->setupTemplate(true, $articleId, 'editing');
     $suppFileId = (int) array_shift($args);
     $journal =& $request->getJournal();
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($submission, $journal, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         // Send a notification to associated users
         import('lib.pkp.classes.notification.NotificationManager');
         $notificationManager = new NotificationManager();
         $articleDao =& DAORegistry::getDAO('ArticleDAO');
         $article =& $articleDao->getArticle($articleId);
         $notificationUsers = $article->getAssociatedUserIds(true, false);
         foreach ($notificationUsers as $userRole) {
             $url = $request->url(null, $userRole['role'], 'submissionEditing', $article->getId(), null, 'layout');
             $notificationManager->createNotification($userRole['id'], 'notification.type.suppFileModified', $article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED);
         }
         $request->redirect(null, null, 'submission', $articleId);
     } else {
         $submitForm->display();
     }
 }
Пример #3
0
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args)
 {
     $paperId = Request::getUserVar('paperId');
     $this->validate($paperId, true);
     $authorSubmission =& $this->submission;
     parent::setupTemplate(true, $paperId, 'summary');
     $suppFileId = isset($args[0]) ? (int) $args[0] : 0;
     import('submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($authorSubmission, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         Request::redirect(null, null, null, 'submission', $paperId);
     } else {
         $submitForm->display();
     }
 }
 /**
  * Upload a new supplementary file.
  */
 function uploadSuppFile($fileName = null, $request)
 {
     $articleId = $request->getUserVar('articleId');
     $this->validate($articleId);
     $submission =& $this->submission;
     $journal =& $request->getJournal();
     import('classes.submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission, $journal);
     $suppFileForm->setData('title', array($submission->getLocale() => Locale::translate('common.untitled')));
     $suppFileId = $suppFileForm->execute($fileName);
     $request->redirect(null, null, 'editSuppFile', array($articleId, $suppFileId));
 }
Пример #5
0
 /**
  * Upload a new supplementary file.
  * @param $fileName string
  * @param $round int
  */
 function _uploadSuppFile($request, $fileName = null, $round = null)
 {
     $paperId = (int) $request->getUserVar('paperId');
     $this->validate($request, $paperId);
     $conference =& $request->getConference();
     $schedConf =& $request->getSchedConf();
     $submission =& $this->submission;
     import('classes.submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', array($submission->getLocale() => Locale::translate('common.untitled')));
     $suppFileId = $suppFileForm->execute($fileName);
     $request->redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, $request)
 {
     $paperId = $request->getUserVar('paperId');
     $this->validate($request, $paperId, true);
     $authorSubmission =& $this->submission;
     parent::setupTemplate($request, true, $paperId, 'summary');
     $suppFileId = (int) array_shift($args);
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($authorSubmission, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         $request->redirect(null, null, null, 'submission', $paperId);
     } else {
         $submitForm->display();
     }
 }
Пример #7
0
 /**
  * Submit other supplementary research output
  * @param $args array ($articleId)
  *
  * Added by: AIM
  * Last Updated: July 18, 2011
  */
 function addOtherSuppResearchOutput($args, $request)
 {
     $articleId = (int) array_shift($args);
     $journal =& $request->getJournal();
     $this->validate($articleId);
     $authorSubmission =& $this->submission;
     $this->setupTemplate(true, $articleId, 'summary');
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($authorSubmission, $journal);
     //Added by AIM, June 22 2011
     $submitForm->setData('type', 'Other Supplementary Research Output');
     if ($submitForm->isLocaleResubmit()) {
         $submitForm->readInputData();
     } else {
         $submitForm->initData();
     }
     $submitForm->display();
 }
Пример #8
0
 /**
  * Upload a new supplementary file.
  */
 function uploadSuppFile($fileName = null)
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId);
     $submission =& $this->submission;
     import('submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', Locale::translate('common.untitled'));
     $suppFileId = $suppFileForm->execute($fileName);
     Request::redirect(null, null, 'editSuppFile', array($articleId, $suppFileId));
 }
Пример #9
0
 /**
  * Upload a new supplementary file.
  * @param $fileName string
  * @param $stage int
  */
 function uploadSuppFile($fileName = null, $stage = null)
 {
     $paperId = Request::getUserVar('paperId');
     list($conference, $schedConf, $submission) = $this->validate($paperId);
     import('submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', Locale::translate('common.untitled'));
     $suppFileId = $suppFileForm->execute($fileName);
     Request::redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
 }
Пример #10
0
 /**
  * Upload a new supplementary file.
  * @param $fileName string
  * @param $stage int
  */
 function uploadSuppFile($fileName = null, $stage = null)
 {
     $paperId = Request::getUserVar('paperId');
     $this->validate($paperId);
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     $submission =& $this->submission;
     import('submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', array(AppLocale::getLocale() => __('common.untitled')));
     $suppFileId = $suppFileForm->execute($fileName);
     Request::redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
 }