addElement('hidden', 'action', array('value' => 'remoteLogin')); $this->addElement('hidden', 'code', array('value' => $this->_code)); return $this; } public function render(Zend_View_Interface $view = null) { /** @var $doc App_Doc_Admin */ $doc = Zend_Registry::get('doc'); $doc->addInlineScript('initRedirectForm', " function initRedirectForm(idForm) { if ($('#' + idForm).size()) { document.getElementById(idForm).submit(); } } "); $doc->addInitFunction('initRedirectForm', array($this->getAttrib('id'))); return parent::render($view); } public function setCode($code) { $this->_code = $code; return $this; } public function getCode() { return $this->_code; } }