The short story: * If I save edits to Step 4 form I created, it seems to overwrite settings for the Conference, is it something to do with the code below referring to conference settings?
Here's the long story of what I've done...
- copied /templates/manager/setup/step3.tpl -> /templates/manager/schedConfSetup/step4.tpl
- edit schedConfSetup/index.tpl to include pointer to step4.tpl ( also copied from setup/index.tpl)
-- will now show on /manager/schedConfSetup/4 - but page is not active - add entry to schedConfSetup/setupHeader.tpl to include pointer to step4.tpl copied from setup/setupHeader.tpl
-- will now show in header between steps - Edit pages/manager/SchedConfSetupHandler.inc.php to change range of steps from 3 to 4 (lines 30, 59, 162, 167)
- copied /classes/manager/form/setup/ConferenceSetupStep3Form.inc.php to /classes/manager/form/schedConfSetup/SchedConfSetupStep4Form.inc.php (note change from step 3 to 4 in filename)
- Edited the above SchedConfSetupStep4.inc.php - basic stuff, plus used $schedConf instead of $conference near end.
- Now I'm stuck. If I save edits to Step 4 in the form, it seems to overwrite settings for the Conference, is it something to do with the settings used at the bottom of the following code? Or are there more things I need to change to fix the save operation?
SchedconfSetupStep4.inc.php
- Code: Select all
...
import("manager.form.schedConfSetup.SchedConfSetupForm");
class SchedConfSetupStep4Form extends SchedConfSetupForm {
function SchedConfSetupStep4Form() {
parent::SchedConfSetupForm(
4, // CHANGED FROM 3 to 4 - NOT SURE IF I NEED TO ??
array(
'homeHeaderTitleType' => 'int',
'homeHeaderTitle' => 'string',
'pageHeaderTitleType' => 'int',
'pageHeaderTitle' => 'string',
'navItems' => 'object',
'conferencePageHeader' => 'string',
'conferencePageFooter' => 'string',
'itemsPerPage' => 'int',
'numPageLinks' => 'int'
)
);
}
/**
* Get the list of field names for which localized settings are used.
* @return array
*/
function getLocaleFieldNames() {
return array('homeHeaderTitleType', 'homeHeaderTitle', 'pageHeaderTitleType', 'pageHeaderTitle', 'navItems', 'conferencePageHeader', 'conferencePageFooter');
}
function readInputData() {
parent::readInputData();
}
/**
* Display the form.
*/
function display() {
//$conference = &Request::getConference();
$schedConf = &Request::getSchedConf();
// Ensure upload file settings are reloaded when the form is displayed.
$templateMgr = &TemplateManager::getManager();
// WILL THIS WORK? IT SEEMS TO OVERWRITE THE CONFERENCE LEVELS SETTINGS #######
$templateMgr->assign(array(
//'homeHeaderTitleImage' => $conference->getSetting('homeHeaderTitleImage'),
'homeHeaderTitleImage' => $schedConf->getSetting('homeHeaderTitleImage'),
'homeHeaderLogoImage'=> $schedConf->getSetting('homeHeaderLogoImage'),
'pageHeaderTitleImage' => $schedConf->getSetting('pageHeaderTitleImage'),
'pageHeaderLogoImage' => $schedConf->getSetting('pageHeaderLogoImage'),
'homepageImage' => $schedConf->getSetting('homepageImage')
));
parent::display();
}
}
?>
