Esempio n. 1
0
 public function formAction()
 {
     $f = new Application_Form_Test();
     if ($this->_request->isPost()) {
         if ($f->isValid($this->_request->getParams())) {
             if ($f->imagen->receive()) {
                 $this->_helper->FlashMessenger('Todo ok');
                 $this->_redirect('/test/form');
             }
         }
         $this->view->values = $f->getValues();
     }
     $this->view->f = $f;
 }
Esempio n. 2
0
 public function agregarAction()
 {
     $form = new Application_Form_Test();
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($this->_getAllParams())) {
             $model = new Application_Model_Tests();
             $model->save($form->getValues());
             return $this->_redirect('/tests/');
         }
     }
     $this->view->form = $form;
 }