Ejemplo n.º 1
0
 /**
  * Returns the registration form
  * @return Sydney_Form
  */
 private function getRegistrationForm()
 {
     $r = $this->getRequest();
     if (isset($r->redirectmodule)) {
         $action = '/default/login/registerprocess/redirectmodule/' . $r->getParam('redirectmodule', 'admindashboard');
     } elseif (isset($r->redirectpage)) {
         $action = '/default/login/registerprocess/redirectpage/' . $r->redirectpage;
     } else {
         $action = '/default/login/registerprocess/';
     }
     $config = new Zend_Config_Ini(__DIR__ . '/../config/default.login.index.ini', 'register');
     $form = new Sydney_Form($config);
     if (isset($this->_config->register->showlegalagreement) && $this->_config->register->showlegalagreement == 'yes') {
         $form->addElement('radio', 'legalnotes', array('required' => true, 'order' => 5, 'label' => 'Do you accept our legal agreement ?', 'text' => 'hello man!', 'validators' => array('NotEmpty', array('Identical', false, 'yes')), 'multioptions' => array('yes' => 'Yes', 'no' => 'No')));
     }
     $form->setAction($action);
     return $form;
 }