classes/manager/form/AccommodationSettingsForm.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00020 // $Id$
00021 
00022 
00023 import('form.Form');
00024 
00025 class AccommodationSettingsForm extends Form {
00026 
00028    var $settings;
00029 
00033    function AccommodationSettingsForm() {
00034       parent::Form('manager/accommodationSettings.tpl');
00035 
00036       $this->addCheck(new FormValidatorPost($this));
00037    }
00038 
00042    function display() {
00043       import('file.PublicFileManager');
00044       $schedConf =& Request::getSchedConf();
00045 
00046       $templateMgr =& TemplateManager::getManager();
00047       $site =& Request::getSite();
00048       $templateMgr->assign('helpTopicId','conference.currentConferences.accommodation');
00049       $templateMgr->assign('publicSchedConfFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getSchedConfFilesPath($schedConf->getId()));
00050       $templateMgr->assign('accommodationFiles', $schedConf->getSetting('accommodationFiles'));
00051       parent::display();
00052    }
00053 
00057    function initData() {
00058       $schedConf =& Request::getSchedConf();
00059       $this->_data = array();
00060       $this->_data['accommodationDescription'] = $schedConf->getSetting('accommodationDescription');
00061    }
00062    
00067    function getLocaleFieldNames() {
00068       return array('accommodationDescription', 'accommodationFileTitle');
00069    }
00070 
00074    function readInputData() {
00075       $this->readUserVars(array('accommodationDescription', 'accommodationFileTitle'));
00076    }
00077 
00081    function execute() {
00082       $schedConf =& Request::getSchedConf();
00083       $settingsDao =& DAORegistry::getDAO('SchedConfSettingsDAO');
00084 
00085       foreach ($this->_data as $name => $value) {
00086          $settingsDao->updateSetting(
00087             $schedConf->getId(),
00088             $name,
00089             $value,
00090             $this->settings[$name],
00091             true // Localized
00092          );
00093       }
00094    }
00095 }
00096 
00097 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7