Пример #1
0
 public function saveMaterialLocationAction()
 {
     $project_id = $this->_getParam('id');
     $data = ProNav_Utils::stripTagsAndTrim(Zend_Json::decode($this->_getParam('data', array())));
     $jOut = array();
     $errors = array();
     $n = Application_Model_Projects::SaveMaterialLocation($project_id, $data);
     if ($n) {
         $project = Application_Model_Projects::GetProjectRow($project_id);
         $jOut['message'] = $this->view->partial('project/material-location.phtml', array('projectinfo' => $project));
     } else {
         $errors[] = "No rows updated";
     }
     $jOut["errors"] = $errors;
     echo Zend_Json::encode($jOut);
 }