Esempio n. 1
0
 function renderForm($addHidden)
 {
     $this->initPossibleConditions();
     $t = new Am_View();
     $renderer = HTML_QuickForm2_Renderer::factory('array');
     if (!$this->form) {
         $this->createForm(array());
     }
     $this->form->render($renderer);
     $t->assign('form', $renderer->toArray());
     $t->assign('description', $this->getDescription(true));
     $t->assign('serialized', $this->serialize());
     $t->assign('hidden', $addHidden);
     $t->assign('loadSearchOptions', Am_Controller::renderOptions($this->getLoadOptions(), $this->saved_search_id));
     return $t->render($this->template);
 }
Esempio n. 2
0
 public function render(HTML_QuickForm2_Renderer $renderer)
 {
     if (method_exists($renderer->getJavascriptBuilder(), 'addValidateJs')) {
         $renderer->getJavascriptBuilder()->addValidateJs('errorElement: "span"');
     }
     return parent::render($renderer);
 }