00001 <?php
00002
00015
00016
00017 import('form.Form');
00018
00019 class ScheduleLayoutForm extends Form {
00024 function ScheduleLayoutForm() {
00025 parent::Form('manager/scheduler/scheduleLayoutForm.tpl');
00026
00027 $this->addCheck(new FormValidatorPost($this));
00028 }
00029
00030
00034 function initData() {
00035 $schedConf =& Request::getSchedConf();
00036
00037 $this->_data = array(
00038 'mergeSchedules' => $schedConf->getSetting('mergeSchedules'),
00039 'showEndTime' => $schedConf->getSetting('showEndTime'),
00040 'showAuthors' => $schedConf->getSetting('showAuthors'),
00041 'hideNav' => $schedConf->getSetting('hideNav'),
00042 'hideLocations' => $schedConf->getSetting('hideLocations'),
00043 'layoutType' => $schedConf->getSetting('layoutType')
00044 );
00045 }
00046
00050 function readInputData() {
00051 $this->readUserVars(array('mergeSchedules', 'showEndTime', 'showAuthors', 'hideNav', 'hideLocations', 'layoutType'));
00052 }
00053
00057 function execute() {
00058 $schedConf =& Request::getSchedConf();
00059
00060 $schedConf->updateSetting('mergeSchedules', $this->getData('mergeSchedules'), 'bool');
00061 $schedConf->updateSetting('showEndTime', $this->getData('showEndTime'), 'bool');
00062 $schedConf->updateSetting('showAuthors', $this->getData('showAuthors'), 'bool');
00063 $schedConf->updateSetting('hideNav', $this->getData('hideNav'), 'bool');
00064 $schedConf->updateSetting('hideLocations', $this->getData('hideLocations'), 'bool');
00065 $schedConf->updateSetting('layoutType', $this->getData('layoutType'), 'int');
00066 }
00067 }
00068
00069 ?>