Exemplo n.º 1
0
 public function process(Vtiger_Request $request)
 {
     $moduleSettingsName = $request->getModule(false);
     $moduleName = $request->getModule();
     $baseModule = $request->get('module_name');
     $idTpl = $request->get('tpl_id');
     $viewer = $this->getViewer($request);
     if ($idTpl) {
         $docInfo = Settings_OSSDocumentControl_Module_Model::getDocInfo($idTpl);
         $viewer->assign('BASE_INFO', $docInfo['basic_info']);
         //var_dump($docInfo['required_conditions']);
         for ($i = 0; $i < count($docInfo['required_conditions']); $i++) {
             $fieldModel = Vtiger_Field_Model::getInstance($docInfo['required_conditions'][$i]['fieldname'], Vtiger_Module_Model::getInstance($baseModule));
             $docInfo['required_conditions'][$i]['info'] = $fieldModel->getFieldInfo();
         }
         $viewer->assign('REQUIRED_CONDITIONS', $docInfo['required_conditions']);
         for ($i = 0; $i < count($docInfo['optional_conditions']); $i++) {
             $fieldModel = Vtiger_Field_Model::getInstance($docInfo['optional_conditions'][$i]['fieldname'], Vtiger_Module_Model::getInstance($baseModule));
             $docInfo['optional_conditions'][$i]['info'] = $fieldModel->getFieldInfo();
         }
         $viewer->assign('OPTIONAL_CONDITIONS', $docInfo['optional_conditions']);
         $viewer->assign('TPL_ID', $idTpl);
         //$fieldModel = Vtiger_Field_Model::getInstance($value->get('name'), $baseModuleModel);
     }
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('SUMMARY', $request->get('summary'));
     $viewer->assign('BASE_MODULE', $baseModule);
     $viewer->assign('QUALIFIED_MODULE', $moduleSettingsName);
     $viewer->assign('FIELD_LIST', Settings_OSSDocumentControl_Module_Model::getListBaseModuleField($baseModule));
     //$viewer->assign('FOLDER_LIST', Documents_Module_Model::getAllFolders());
     $viewer->assign('CONDITION_BY_TYPE', Settings_OSSDocumentControl_Module_Model::getConditionByType());
     echo $viewer->view('Edit2.tpl', $moduleSettingsName, true);
 }
Exemplo n.º 2
0
 public function process(Vtiger_Request $request)
 {
     $moduleSettingsName = $request->getModule(false);
     $moduleName = $request->getModule();
     $idTpl = $request->get('tpl_id');
     $viewer = $this->getViewer($request);
     if ($idTpl) {
         $docInfo = Settings_OSSDocumentControl_Module_Model::getDocInfo($idTpl);
         $viewer->assign('BASE_INFO', $docInfo['basic_info']);
         $viewer->assign('TPL_ID', $idTpl);
     }
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('MODULE_LIST', Settings_OSSDocumentControl_Module_Model::getSupportedModules());
     $viewer->assign('SETTINGS_MODULE_NAME', $moduleSettingsName);
     echo $viewer->view('Edit.tpl', $moduleSettingsName, true);
 }