00001 <?php
00002
00016
00017 import('controllers.tab.settings.form.PressSettingsForm');
00018
00019 class HomepageForm extends PressSettingsForm {
00020
00024 function HomepageForm($wizardMode = false) {
00025 $settings = array(
00026 'enableAnnouncements' => 'bool',
00027 'enableAnnouncementsHomepage' => 'bool',
00028 'numAnnouncementsHomepage' => 'int',
00029 'announcementsIntroduction' => 'string',
00030 'readerInformation' => 'string',
00031 'authorInformation' => 'string',
00032 'librarianInformation' => 'string'
00033 );
00034
00035 parent::PressSettingsForm($settings, 'controllers/tab/settings/homepage/form/homepageForm.tpl', $wizardMode);
00036 }
00037
00038
00039
00040
00041
00045 function getLocaleFieldNames() {
00046 return array('announcementsIntroduction', 'readerInformation', 'authorInformation', 'librarianInformation');
00047 }
00048
00049
00050
00051
00052
00056 function fetch(&$request) {
00057 for($x = 1; $x < 11; $x++) {
00058 $numAnnouncementsHomepageOptions[$x] = $x;
00059 }
00060
00061 $params = array(
00062 'numAnnouncementsHomepageOptions' => $numAnnouncementsHomepageOptions,
00063 'disableAnnouncementsHomepage' => !$this->getData('enableAnnouncementsHomepage')
00064 );
00065
00066 return parent::fetch(&$request, $params);
00067 }
00068 }
00069
00070 ?>