addCheck(new FormValidatorPost($this)); $this->step = $step; $this->settings = $settings; } /** * Display the form. */ function display() { $templateMgr = &TemplateManager::getManager(); $templateMgr->assign('setupStep', $this->step); $templateMgr->assign('helpTopicId', 'schedConf.managementPages.setup'); $templateMgr->assign('yearOffsetFuture', SCHED_CONF_DATE_YEAR_OFFSET_FUTURE); parent::display(); } /** * Initialize data from current settings. */ function initData() { $schedConf = &Request::getSchedConf(); $this->_data = $schedConf->getSettings(); } /** * Read user input. */ function readInputData() { $this->readUserVars(array_keys($this->settings)); } /** * Save modified settings. */ function execute() { $schedConf = &Request::getSchedConf(); $settingsDao = &DAORegistry::getDAO('SchedConfSettingsDAO'); foreach ($this->_data as $name => $value) { if (isset($this->settings[$name])) { $isLocalized = in_array($name, $this->getLocaleFieldNames()); $settingsDao->updateSetting( $schedConf->getSchedConfId(), $name, $value, $this->settings[$name], $isLocalized ); } } } } ?>