journalId = $journalId; $this->plugin =& $plugin; parent::Form($plugin->getTemplatePath() . 'settingsForm.tpl'); $this->addCheck(new FormValidatorPost($this)); } /** * Initialize form data. */ function initData() { $journalId = $this->journalId; $plugin =& $this->plugin; $this->setData('allowAuthorSpecify', $plugin->getSetting($journalId, 'allowAuthorSpecify')); $this->setData('depositPoints', $plugin->getSetting($journalId, 'depositPoints')); } /** * Assign form data to user-submitted data. */ function readInputData() { $this->readUserVars(array('allowAuthorSpecify')); } /** * Display the form. */ function display() { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('depositPointTypes', $this->plugin->getTypeMap()); return parent::display(); } /** * Save settings. */ function execute() { $plugin =& $this->plugin; $journalId = $this->journalId; $plugin->updateSetting($journalId, 'allowAuthorSpecify', $this->getData('allowAuthorSpecify')); } } ?>