/** Add a surface treatment * @access public * @return void */ public function addsurfaceAction() { $form = new SurfaceTreatmentsForm(); $form->submit->setLabel('Add new surface treatment'); $this->view->form = $form; if ($this->getRequest()->isPost()) { if ($form->isValid($this->_request->getPost())) { $surfaces = new SurfaceTreatments(); $surfaces->add($form->getValues()); $this->getFlash()->addMessage('A new surface treatment has been created on the system!'); $this->redirect($this->_redirectUrl . 'surfaces'); } else { $form->populate($form->getValues()); } } }