• Main Page
  • Modules
  • Classes
  • Files
  • File List

classes/submission/form/SubmissionSubmitForm.inc.php

00001 <?php
00002 
00020 import('lib.pkp.classes.form.Form');
00021 
00022 class SubmissionSubmitForm extends Form {
00024    var $press;
00025 
00027    var $monographId;
00028 
00030    var $monograph;
00031 
00033    var $step;
00034 
00040    function SubmissionSubmitForm($press, $monograph, $step) {
00041       parent::Form(sprintf('submission/form/step%d.tpl', $step));
00042       $this->addCheck(new FormValidatorPost($this));
00043       $this->step = (int) $step;
00044       $this->monograph = $monograph;
00045       $this->monographId = $monograph ? $monograph->getId() : null;
00046       $this->press =& $press;
00047    }
00048 
00052    function display($request = null) {
00053       $templateMgr =& TemplateManager::getManager();
00054 
00055       $templateMgr->assign('monographId', $this->monographId);
00056       $templateMgr->assign('submitStep', $this->step);
00057 
00058       if (isset($this->monograph)) {
00059          $submissionProgress = $this->monograph->getSubmissionProgress();
00060       } else {
00061          $submissionProgress = 1;
00062       }
00063       $templateMgr->assign('submissionProgress', $submissionProgress);
00064 
00065       switch($this->step) {
00066          case 3:
00067             $helpTopicId = 'submission.indexingAndMetadata';
00068             break;
00069          default:
00070             $helpTopicId = 'submission.index';
00071       }
00072       $templateMgr->assign('helpTopicId', $helpTopicId);
00073 
00074       $settingsDao =& DAORegistry::getDAO('PressSettingsDAO');
00075       $templateMgr->assign_by_ref('pressSettings', $settingsDao->getPressSettings($this->press->getId()));
00076 
00077       parent::display($request);
00078    }
00079 }
00080 
00081 ?>

Generated on Mon Sep 17 2012 13:58:55 for Open Monograph Press by  doxygen 1.7.1