function display() { $templateMgr =& TemplateManager::getManager(); if (Config::getVar('email', 'allow_envelope_sender')) { $templateMgr->assign('envelopeSenderEnabled', true); } $countryDao = DAORegistry::getDAO('CountryDAO'); $countries =& $countryDao->getCountries(); $templateMgr->assign_by_ref('countries', $countries); parent::display(); }
/** * Display the form */ function display() { $templateMgr =& TemplateManager::getManager(); import('mail.MailTemplate'); $mail = new MailTemplate('SUBMISSION_ACK'); if ($mail->isEnabled()) { $templateMgr->assign('submissionAckEnabled', true); } if ($this->_data['reviewDeadlineType'] == REVIEW_DEADLINE_TYPE_ABSOLUTE) { $templateMgr->assign('absoluteReviewDate', $this->_data['numWeeksPerReviewAbsolute']); } if (Config::getVar('general', 'scheduled_tasks')) { $templateMgr->assign('scheduledTasksEnabled', true); } parent::display(); }
/** * Display the form */ function display() { $templateMgr =& TemplateManager::getManager(); import('mail.MailTemplate'); $mail = new MailTemplate('SUBMISSION_ACK'); if ($mail->isEnabled()) { $templateMgr->assign('submissionAckEnabled', true); } if ($this->_data['reviewDeadlineType'] == REVIEW_DEADLINE_TYPE_ABSOLUTE) { $templateMgr->assign('absoluteReviewDate', $this->_data['numWeeksPerReviewAbsolute']); } if (Config::getVar('general', 'scheduled_tasks')) { $templateMgr->assign('scheduledTasksEnabled', true); } import('manager.form.TimelineForm'); $schedConf =& Request::getSchedConf(); list($earliestDate, $latestDate) = TimelineForm::getOutsideDates($schedConf); $templateMgr->assign('firstYear', strftime('%Y', $earliestDate)); $templateMgr->assign('lastYear', strftime('%Y', $latestDate)); parent::display(); }
/** * Save modified settings. */ function execute() { $schedConf =& Request::getSchedConf(); $paperTypeIds = array(); $paperTypeDao = DAORegistry::getDAO('PaperTypeDAO'); $paperTypeEntryDao = DAORegistry::getDAO('PaperTypeEntryDAO'); if (isset($this->_data['paperTypes'])) { $paperTypes =& $this->_data['paperTypes']; $paperTypesEntry =& $paperTypeDao->build($schedConf->getId()); $i = 0; foreach ($paperTypes as $paperTypeId => $paperType) { if (is_numeric($paperTypeId)) { // Entry should already exist; update $paperTypeEntry = $paperTypeEntryDao->getById($paperTypeId, $paperTypesEntry->getId()); if (!$paperTypeEntry) { continue; } } else { // Entry is new; create $paperTypeEntry = $paperTypeEntryDao->newDataObject(); $paperTypeEntry->setControlledVocabId($paperTypesEntry->getId()); } $paperTypeEntry->setName($paperType['name'], null); // Localized $paperTypeEntry->setDescription($paperType['description'], null); // Localized $paperTypeEntry->setAbstractLength($paperType['abstractLength']); $paperTypeEntry->setLength($paperType['length']); $paperTypeEntry->setSequence($i++); if (is_numeric($paperTypeId)) { $paperTypeEntryDao->updateObject($paperTypeEntry); } else { $paperTypeEntryDao->insertObject($paperTypeEntry); } $paperTypeIds[] = $paperTypeEntry->getId(); } } // Find and handle deletions $paperTypeEntryIterator = $paperTypeDao->getPaperTypes($schedConf->getId()); while ($paperTypeEntry =& $paperTypeEntryIterator->next()) { if (!in_array($paperTypeEntry->getId(), $paperTypeIds)) { $paperTypeEntryDao->deleteObject($paperTypeEntry); } unset($paperTypeEntry); } return parent::execute(); }