/**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     if (Config::getVar('general', 'scheduled_tasks')) {
         $templateMgr->assign('scheduledTasksEnabled', true);
     }
     parent::display();
 }
 /**
  * Display the form.
  */
 function display()
 {
     $press =& Request::getPress();
     $templateMgr =& TemplateManager::getManager();
     if (Config::getVar('email', 'allow_envelope_sender')) {
         $templateMgr->assign('envelopeSenderEnabled', true);
     }
     $templateMgr->assign('pressEnabled', $press->getEnabled());
     parent::display();
 }
 function execute()
 {
     // Save the block plugin layout settings.
     $blockVars = array('blockSelectLeft', 'blockUnselected', 'blockSelectRight');
     foreach ($blockVars as $varName) {
         ${$varName} = split(' ', Request::getUserVar($varName));
     }
     $plugins =& PluginRegistry::loadCategory('blocks');
     foreach ($plugins as $key => $junk) {
         $plugin =& $plugins[$key];
         // Ref hack
         $plugin->setEnabled(!in_array($plugin->getName(), $blockUnselected));
         if (in_array($plugin->getName(), $blockSelectLeft)) {
             $plugin->setBlockContext(BLOCK_CONTEXT_LEFT_SIDEBAR);
             $plugin->setSeq(array_search($key, $blockSelectLeft));
         } else {
             if (in_array($plugin->getName(), $blockSelectRight)) {
                 $plugin->setBlockContext(BLOCK_CONTEXT_RIGHT_SIDEBAR);
                 $plugin->setSeq(array_search($key, $blockSelectRight));
             }
         }
         unset($plugin);
     }
     // Save alt text for images
     $press =& Request::getPress();
     $pressId = $press->getId();
     $locale = $this->getFormLocale();
     $settingsDao =& DAORegistry::getDAO('PressSettingsDAO');
     $images = $this->images;
     foreach ($images as $settingName) {
         $value = $press->getSetting($settingName);
         if (!empty($value)) {
             $imageAltText = $this->getData($this->image_settings[$settingName]);
             $value[$locale]['altText'] = $imageAltText[$locale];
             $settingsDao->updateSetting($pressId, $settingName, $value, 'object', true);
         }
     }
     // Save remaining settings
     return parent::execute();
 }
 /**
  * Constructor.
  */
 function PressSetupStep4Form()
 {
     parent::PressSetupForm(4, array('disableUserReg' => 'bool', 'allowRegReader' => 'bool', 'allowRegAuthor' => 'bool', 'allowRegReviewer' => 'bool', 'restrictSiteAccess' => 'bool', 'restrictMonographAccess' => 'bool', 'showGalleyLinks' => 'bool', 'openAccessPolicy' => 'string', 'enableAnnouncements' => 'bool', 'enableAnnouncementsHomepage' => 'bool', 'numAnnouncementsHomepage' => 'int', 'announcementsIntroduction' => 'string', 'volumePerYear' => 'int', 'enablePublicMonographId' => 'bool', 'enablePublicGalleyId' => 'bool', 'enablePageNumber' => 'bool', 'searchDescription' => 'string', 'searchKeywords' => 'string', 'customHeaders' => 'string'));
 }
 /**
  * Assign form data to user-submitted data.
  */
 function readInputData()
 {
     parent::readInputData();
 }