Esempio n. 1
0
 public function process(Vtiger_Request $request)
 {
     $log = vglobal('log');
     $log->debug("Entering Settings_RealizationProcesses_Index_View::process() method ...");
     $qualifiedModule = $request->getModule(false);
     $viewer = $this->getViewer($request);
     $projectStatus = Settings_RealizationProcesses_Module_Model::getProjectStatus();
     $statusNotModify = Settings_RealizationProcesses_Module_Model::getStatusNotModify();
     $viewer->assign('STATUS_NOT_MODIFY', $statusNotModify);
     $viewer->assign('PROJECT_STATUS', $projectStatus);
     $viewer->assign('QUALIFIED_MODULE', $request->getModule(false));
     $viewer->view('Index.tpl', $qualifiedModule);
     $log->debug("Exiting Settings_RealizationProcesses_Index_View::process() method ...");
 }
Esempio n. 2
0
 /**
  * Save date
  * @param <array> request
  * @return true if saved, false otherwise
  */
 public function save(Vtiger_Request $request)
 {
     $response = new Vtiger_Response();
     $status = $request->get('status');
     $moduleId = $request->get('moduleId');
     $moduleName = $request->getModule(false);
     try {
         if (Settings_RealizationProcesses_Module_Model::updateStatusNotModify($moduleId, $status)) {
             $response->setResult(array('success' => true, 'message' => vtranslate('LBL_SAVE_CONFIG_OK', $moduleName)));
         } else {
             $response->setResult(array('success' => false, 'message' => vtranslate('LBL_SAVE_CONFIG_ERROR', $moduleName)));
         }
     } catch (Exception $e) {
         $response->setError($e->getCode(), $e->getMessage());
     }
     $response->emit();
 }