Ejemplo n.º 1
0
 /** Add a suggested research topic
  * @access public
  * @return void
  */
 public function addsuggestedAction()
 {
     $form = new SuggestedForm();
     $form->submit->setLabel('Add a project');
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $this->_suggested->add($form->getValues());
             $this->getFlash()->addMessage('A new suggested research project has been entered.');
             $this->redirect(self::REDIRECT . 'suggested/');
         } else {
             $form->populate($form->getValues());
         }
     }
 }