authId = $authId; $this->addCheck(new FormValidatorPost($this)); } /** * Display the form. */ function display() { $templateMgr = &TemplateManager::getManager(); $templateMgr->assign('authId', $this->authId); $templateMgr->assign('helpTopicId', 'site.siteManagement'); if (isset($this->plugin)) { $this->plugin->addLocaleData(); $templateMgr->assign('pluginTemplate', $this->plugin->getSettingsTemplate()); } parent::display(); } /** * Initialize form data from current settings. */ function initData() { $authDao = &DAORegistry::getDAO('AuthSourceDAO'); $auth = &$authDao->getSource($this->authId); if ($auth != null) { $this->_data = array( 'plugin' => $auth->getPlugin(), 'title' => $auth->getTitle(), 'settings' => $auth->getSettings() ); $this->plugin = &$auth->getPluginClass(); } } /** * Assign form data to user-submitted data. */ function readInputData() { $this->readUserVars(array('title', 'settings')); } /** * Save conference settings. */ function execute() { $authDao = &DAORegistry::getDAO('AuthSourceDAO'); $auth = &new AuthSource(); $auth->setAuthId($this->authId); $auth->setTitle($this->getData('title')); $auth->setSettings($this->getData('settings')); $authDao->updateSource($auth); } } ?>