| // +---------------------------------------------------------------------------+ function hasAgreed() { if ($_SESSION['_installationWizard_container']['values']['page1']['agree']['agree'] == 'yes') { return true; } else { return false; } } /** * @package Install */ class WizardLicenseAgreement extends HTML_QuickForm_Page { function buildForm() { $this->_formBuilt = true; $licenseTxt = file_get_contents(SGL_PATH . '/COPYING.txt'); $this->setDefaults(array( 'license' => $licenseTxt, )); $this->setDefaults(SGL_Install_Common::overrideDefaultInstallSettings()); $this->addElement('header', null, 'Seagull License Agreement: page 1 of 6'); $this->addElement('textarea', 'license', null, array('rows' => 15, 'cols' => 80)); $radio[] = &$this->createElement('radio', 'agree', '', "I accept the terms of the license agreement", 'yes'); $radio[] = &$this->createElement('radio', 'agree', '', "I do not accept the terms of the license agreement", 'no'); $this->addGroup($radio, 'agree', null, '
'); $this->addGroupRule('agree', 'You must agree with the License terms in order to install and use this product', 'required'); $this->registerRule('hasAgreed','function','hasAgreed'); $this->addRule('agree', 'You must agree with the License terms in order to install and use this product', 'hasAgreed'); $this->addElement('submit', $this->getButtonName('next'), 'Next >>'); $this->setDefaultAction('next'); } } ?>