Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
AddSignoffFileLinkAction.inc.php
1 <?php
2 
16 import('lib.pkp.classes.linkAction.LinkAction');
17 
18 // Bring in SUBMISSION_FILE_* constants
19 import('lib.pkp.classes.submission.SubmissionFile');
20 
22 
36  function AddSignoffFileLinkAction($request, $submissionId, $stageId, $symbolic, $signoffId = null,
37  $modalTitle, $buttonLabel = null) {
38 
39  // Create the actionArgs array
40  $actionArgs = array();
41  $actionArgs['submissionId'] = $submissionId;
42  $actionArgs['stageId'] = $stageId;
43  $actionArgs['symbolic'] = $symbolic;
44  $actionArgs['signoffId'] = $signoffId;
45  $actionArgs['fileStage'] = SUBMISSION_FILE_SIGNOFF;
46 
47  // Instantiate the file upload modal.
48  $dispatcher = $request->getDispatcher();
49  import('lib.pkp.classes.linkAction.request.WizardModal');
50  $modal = new AjaxModal(
51  $dispatcher->url(
52  $request, ROUTE_COMPONENT, null,
53  'informationCenter.SignoffInformationCenterHandler', 'viewNotes',
54  null, $actionArgs
55  ),
56  $modalTitle, 'modal_add_file'
57  );
58 
59  // Configure the link action.
60  parent::LinkAction('addSignoff', $modal, $buttonLabel, 'add');
61  }
62 }
63 
64 ?>
A modal that retrieves its content from via AJAX.
AddSignoffFileLinkAction($request, $submissionId, $stageId, $symbolic, $signoffId=null, $modalTitle, $buttonLabel=null)
Class for signoff file upload actions.
Base class defining an action that can be performed by the user in the user interface.