/** * Display the form. */ function display($request, $dispatcher) { $templateMgr =& TemplateManager::getManager(); if (Config::getVar('general', 'scheduled_tasks')) { $templateMgr->assign('scheduledTasksEnabled', true); } parent::display($request, $dispatcher); }
/** * Display the form. */ function display($request, $dispatcher) { $templateMgr =& TemplateManager::getManager(); if (Config::getVar('email', 'allow_envelope_sender')) { $templateMgr->assign('envelopeSenderEnabled', true); } parent::display($request, $dispatcher); }
/** * Display the form */ function display() { import('mail.MailTemplate'); $mail = new MailTemplate('SUBMISSION_ACK'); if ($mail->isEnabled()) { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('submissionAckEnabled', true); } parent::display(); }
/** * Display the form. */ function display($request, $dispatcher) { $journal =& Request::getJournal(); $templateMgr =& TemplateManager::getManager(); if (Config::getVar('general', 'scheduled_tasks')) { $templateMgr->assign('scheduledTasksEnabled', true); } // %CBP% Check which type of workflow model is selected $CBPPlatformDao =& DAORegistry::getDAO('CBPPlatformDAO'); $templateMgr->assign_by_ref('workflowModel', $CBPPlatformDao->getWorkshop($journal->getId())); parent::display($request, $dispatcher); }
/** * Display the form * @param $request Request * @param $dispatcher Dispatcher */ function display($request, $dispatcher) { $templateMgr =& TemplateManager::getManager($request); // Add extra style sheets required for ajax components // FIXME: Must be removed after OMP->OJS backporting $templateMgr->addStyleSheet($request->getBaseUrl() . '/styles/ojs.css'); // Add extra java script required for ajax components // FIXME: Must be removed after OMP->OJS backporting $templateMgr->addJavaScript('lib/pkp/js/grid-clickhandler.js'); $templateMgr->addJavaScript('lib/pkp/js/modal.js'); $templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/validate/jquery.validate.min.js'); $templateMgr->addJavaScript('lib/pkp/js/jqueryValidatorI18n.js'); import('classes.mail.MailTemplate'); $mail = new MailTemplate('SUBMISSION_ACK'); if ($mail->isEnabled()) { $templateMgr->assign('submissionAckEnabled', true); } // Citation editor filter configuration // // 1) Check whether PHP5 is available. if (!checkPhpVersion('5.0.0')) { AppLocale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION)); $citationEditorError = 'submission.citations.editor.php5Required'; } else { $citationEditorError = null; } $templateMgr->assign('citationEditorError', $citationEditorError); if (!$citationEditorError) { // 2) Add the filter grid URLs $parserFilterGridUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'grid.filter.ParserFilterGridHandler', 'fetchGrid'); $templateMgr->assign('parserFilterGridUrl', $parserFilterGridUrl); $lookupFilterGridUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'grid.filter.LookupFilterGridHandler', 'fetchGrid'); $templateMgr->assign('lookupFilterGridUrl', $lookupFilterGridUrl); // 3) Create a list of all available citation output filters. $router =& $request->getRouter(); $journal =& $router->getContext($request); import('lib.pkp.classes.metadata.MetadataDescription'); $inputSample = new MetadataDescription('lib.pkp.classes.metadata.nlm.NlmCitationSchema', ASSOC_TYPE_CITATION); $outputSample = 'any string'; $filterDao =& DAORegistry::getDAO('FilterDAO'); $metaCitationOutputFilterObjects =& $filterDao->getCompatibleObjects($inputSample, $outputSample, $journal->getId()); foreach ($metaCitationOutputFilterObjects as $metaCitationOutputFilterObject) { $metaCitationOutputFilters[$metaCitationOutputFilterObject->getId()] = $metaCitationOutputFilterObject->getDisplayName(); } $templateMgr->assign_by_ref('metaCitationOutputFilters', $metaCitationOutputFilters); } parent::display($request, $dispatcher); }
/** * Display the form. */ function display($request, $dispatcher) { $templateMgr =& TemplateManager::getManager(); if (Config::getVar('email', 'allow_envelope_sender')) { $templateMgr->assign('envelopeSenderEnabled', true); } // If Categories are enabled by Site Admin, make selection // tools available to Journal Manager $categoryDao =& DAORegistry::getDAO('CategoryDAO'); $categories =& $categoryDao->getCategories(); $site =& $request->getSite(); if ($site->getSetting('categoriesEnabled') && !empty($categories)) { $templateMgr->assign('categoriesEnabled', true); $templateMgr->assign('allCategories', $categories); } parent::display($request, $dispatcher); }
/** * Constructor. */ function JournalSetupStep4Form() { parent::JournalSetupForm(4, array('disableUserReg' => 'bool', 'allowRegReader' => 'bool', 'allowRegAuthor' => 'bool', 'allowRegReviewer' => 'bool', 'restrictSiteAccess' => 'bool', 'restrictArticleAccess' => 'bool', 'articleEventLog' => 'bool', 'articleEmailLog' => 'bool', 'publicationFormatVolume' => 'bool', 'publicationFormatNumber' => 'bool', 'publicationFormatYear' => 'bool', 'publicationFormatTitle' => 'bool', 'initialVolume' => 'int', 'initialNumber' => 'int', 'initialYear' => 'int', 'pubFreqPolicy' => 'string', 'useCopyeditors' => 'bool', 'copyeditInstructions' => 'string', 'useLayoutEditors' => 'bool', 'layoutInstructions' => 'string', 'provideRefLinkInstructions' => 'bool', 'refLinkInstructions' => 'string', 'useProofreaders' => 'bool', 'proofInstructions' => 'string', 'enableSubscriptions' => 'bool', 'showGalleyLinks' => 'bool', 'openAccessPolicy' => 'string', 'enableAnnouncements' => 'bool', 'enableAnnouncementsHomepage' => 'bool', 'numAnnouncementsHomepage' => 'int', 'announcementsIntroduction' => 'string', 'volumePerYear' => 'int', 'issuePerVolume' => 'int', 'enablePublicIssueId' => 'bool', 'enablePublicArticleId' => 'bool', 'enablePublicGalleyId' => 'bool', 'enablePublicSuppFileId' => 'bool', 'enablePageNumber' => 'bool')); }
function execute() { // Save the block plugin layout settings. $blockVars = array('blockSelectLeft', 'blockUnselected', 'blockSelectRight'); foreach ($blockVars as $varName) { ${$varName} = array_map('urldecode', split(' ', Request::getUserVar($varName))); } $plugins =& PluginRegistry::loadCategory('blocks'); foreach ($plugins as $key => $junk) { $plugin =& $plugins[$key]; // Ref hack $plugin->setEnabled(!in_array($plugin->getName(), $blockUnselected)); if (in_array($plugin->getName(), $blockSelectLeft)) { $plugin->setBlockContext(BLOCK_CONTEXT_LEFT_SIDEBAR); $plugin->setSeq(array_search($key, $blockSelectLeft)); } else { if (in_array($plugin->getName(), $blockSelectRight)) { $plugin->setBlockContext(BLOCK_CONTEXT_RIGHT_SIDEBAR); $plugin->setSeq(array_search($key, $blockSelectRight)); } } unset($plugin); } return parent::execute(); }
function execute() { // Save the block plugin layout settings. $blockVars = array('blockSelectLeft', 'blockUnselected', 'blockSelectRight'); foreach ($blockVars as $varName) { ${$varName} = split(' ', Request::getUserVar($varName)); } $plugins =& PluginRegistry::loadCategory('blocks'); foreach ($plugins as $key => $junk) { $plugin =& $plugins[$key]; // Ref hack $plugin->setEnabled(!in_array($plugin->getName(), $blockUnselected)); if (in_array($plugin->getName(), $blockSelectLeft)) { $plugin->setBlockContext(BLOCK_CONTEXT_LEFT_SIDEBAR); $plugin->setSeq(array_search($key, $blockSelectLeft)); } else { if (in_array($plugin->getName(), $blockSelectRight)) { $plugin->setBlockContext(BLOCK_CONTEXT_RIGHT_SIDEBAR); $plugin->setSeq(array_search($key, $blockSelectRight)); } } unset($plugin); } // Save alt text for images $journal =& Request::getJournal(); $journalId = $journal->getJournalId(); $locale = $this->getFormLocale(); $settingsDao =& DAORegistry::getDAO('JournalSettingsDAO'); $images = $this->images; foreach ($images as $settingName) { $value = $journal->getSetting($settingName); if (!empty($value)) { $imageAltText = $this->getData($this->image_settings[$settingName]); $value[$locale]['altText'] = $imageAltText[$locale]; $settingsDao->updateSetting($journalId, $settingName, $value, 'object', true); } } // Save remaining settings return parent::execute(); }
function execute() { return parent::execute(); }
function execute() { $proposalSourceDao =& DAORegistry::getDAO('ProposalSourceDAO'); if ($proposalSourceDao->countSources() > 0) { $journal = Request::getJournal(); $originalSourceCurrencyAlpha = $journal->getSetting('sourceCurrency'); $formSourceCurrencyApha = $this->getData('sourceCurrency'); if ($originalSourceCurrencyAlpha != $formSourceCurrencyApha) { $exchangeRate = $this->getData('convertionRate'); $exchangeRate = preg_replace('/\\s+/', '', $exchangeRate); $exchangeRate = trim($exchangeRate); if (preg_match('/^[0-9]+([\\.,][0-9]*)?$/', $exchangeRate)) { $exchangeRate = rtrim($exchangeRate, " \t\n\r\v.,0"); if ($exchangeRate != "") { $exchangeRate = str_replace(",", ".", $exchangeRate); $proposalSourceDao->changeCurrency($exchangeRate); } else { return null; } } else { return null; } } } return parent::execute(); }