public function process(Vtiger_Request $request) { ${"GLOBALS"}["joshjxnqy"] = "qualifiedModuleName"; ${"GLOBALS"}["clhmonsj"] = "viewer"; ${"GLOBALS"}["mvqzwlvp"] = "request"; ${${"GLOBALS"}["clhmonsj"]} = $this->getViewer(${${"GLOBALS"}["mvqzwlvp"]}); $tgmmmle = "qualifiedModuleName"; ${${"GLOBALS"}["joshjxnqy"]} = $request->getModule(false); ${${"GLOBALS"}["wdvnidxoyj"]} = VtUtils::getEntityModules(true); $viewer->assign("modules", ${${"GLOBALS"}["wdvnidxoyj"]}); $viewer->view("WorkflowImporter.tpl", ${$tgmmmle}); }
public function beforeGetTaskform($viewer) { global $current_language, $mod_strings; $viewer->assign("related_modules", VtUtils::getEntityModules(true)); $search_module = $this->get("search_module"); if (!empty($_POST["task"]["search_module"])) { $parts = explode("#~#", $_POST["task"]["search_module"]); } elseif (!empty($search_module)) { if ($search_module != -1) { $parts = explode("#~#", $search_module); } } else { return; } if (!empty($parts)) { $viewer->assign("related_tabid", $parts[1]); } }
public function beforeGetTaskform($viewer) { $fields = $this->get('fields'); if (empty($fields) || $fields == -1) { $fields = array(); } $viewer->assign("StaticFieldsField", 'fields'); $viewer->assign("fields", $fields); $viewer->assign("fromFields", $this->getFromFields()); $viewer->assign("related_modules", VtUtils::getEntityModules(true)); $search_module = $this->get("search_module"); if (!empty($_POST["task"]["search_module"])) { $parts = explode("#~#", $_POST["task"]["search_module"]); } elseif (!empty($search_module)) { if ($search_module != -1) { $parts = explode("#~#", $search_module); } } else { return; } if (!empty($parts)) { $viewer->assign("related_tabid", $parts[1]); } }
public function beforeGetTaskform($viewer) { $fields = $this->get('fields'); if (empty($fields) || $fields == -1) { $fields = array(); } $viewer->assign("StaticFieldsField", 'fields'); $viewer->assign("fields", $fields); $viewer->assign("fromFields", $this->getFromFields()); $viewer->assign("related_modules", VtUtils::getEntityModules(true)); $search_module = $this->get("search_module"); if (!empty($_POST["task"]["search_module"])) { $parts = explode("#~#", $_POST["task"]["search_module"]); } elseif (!empty($search_module)) { if ($search_module != -1) { $parts = explode("#~#", $search_module); } } else { return; } $views = array(); $allviews = \CustomView_Record_Model::getAll($parts[0]); foreach ($allviews as $view) { $views[$view->get('cvid')] = $view->get('viewname'); } $viewer->assign('customviews', $views); if (!empty($parts)) { $viewer->assign("related_tabid", $parts[1]); $viewer->assign("target_module_name", $parts[0]); } }
public function beforeGetTaskform($viewer) { global $adb, $current_language, $mod_strings; if (!getTabid('PDFMaker') || !vtlib_isModuleActive('PDFMaker')) { $viewer->assign('disable', true); $this->addConfigHint(getTranslatedString('LBL_FOR_THIS_YOU_NEED_PDFMAKER', 'Settings:Workflow2')); return; } $copies = $this->get('copies'); if ($copies === -1 || empty($copies)) { $this->set('copies', 1); } $viewer->assign("related_modules", VtUtils::getEntityModules(true)); $search_module = $this->get("search_module"); $parts = false; if (!empty($_POST["task"]["search_module"])) { $parts = explode("#~#", $_POST["task"]["search_module"]); } elseif (!empty($search_module)) { if ($search_module != -1) { $parts = explode("#~#", $search_module); $tabid = $parts[1]; } } if (!empty($parts)) { $moduleName = $parts[0]; $tabid = $parts[1]; } else { $moduleName = $this->getModuleName(); $tabid = getTabid($moduleName); } $viewer->assign("related_tabid", $tabid); $fields = VtUtils::getFieldsWithBlocksForModule($moduleName); $viewer->assign("sort_fields", $fields); require_once 'modules/PDFMaker/helpers/Version.php'; $viewer->assign('PDFMAKER_VERSION', PDFMaker_Version_Helper::$version); $sql = "SELECT folderid, foldername FROM vtiger_attachmentsfolder ORDER BY sequence"; $result = $adb->query($sql); $folders = array(); while ($row = $adb->fetch_array($result)) { $folders[] = $row; } $viewer->assign("folders", $folders); $sql = "SELECT templateid, filename, description FROM vtiger_pdfmaker WHERE module = '" . $moduleName . "'"; $result = $adb->query($sql); $templates = array(); while ($row = $adb->fetch_array($result)) { $templates[] = $row; } $viewer->assign("templates", $templates); $workflows = \Workflow2::getWorkflowsForModule("Documents", 1); $viewer->assign("workflows", $workflows); }
public function beforeGetTaskform($viewer) { global $adb, $current_language, $mod_strings; $viewer->assign("related_modules", VtUtils::getEntityModules(true)); $search_module = $this->get("search_module"); if (!empty($_POST["task"]["search_module"])) { $parts = explode("#~#", $_POST["task"]["search_module"]); } elseif (!empty($search_module)) { if ($search_module != -1) { $parts = explode("#~#", $search_module); } } else { return; } if (!empty($parts)) { $viewer->assign("related_tabid", $parts[1]); $search_module_name = VtUtils::getModuleName($parts[1]); #$workflowSettings = $this->getWorkflow()->getSettings(); $workflows = $workflows = Workflow2::getWorkflowsForModule($search_module_name, 1); $viewer->assign("workflows", $workflows); $fields = VtUtils::getFieldsWithBlocksForModule($search_module_name); $viewer->assign("sort_fields", $fields); $moduleObj = \Vtiger_Module_Model::getInstance($search_module_name); $viewer->assign('productCache', array()); if ($moduleObj instanceof \Inventory_Module_Model) { $viewer->assign('searchByProduct', true); $product = $this->get('products'); if (!empty($product)) { //$dataObj = \Vtiger_Record_Model::getInstanceById($product); $productCache[$product] = array('label' => \Vtiger_Functions::getCRMRecordLabel($product)); $viewer->assign('productCache', $productCache); } } $views = array(); $allviews = \CustomView_Record_Model::getAll($search_module_name); foreach ($allviews as $view) { $views[$view->get('cvid')] = $view->get('viewname'); } $viewer->assign('customviews', $views); } }
public function beforeGetTaskform($viewer) { global $adb, $current_language, $mod_strings; $viewer->assign("related_modules", VtUtils::getEntityModules(true)); $search_module = $this->get("search_module"); if (!empty($_POST["task"]["search_module"])) { $parts = explode("#~#", $_POST["task"]["search_module"]); } elseif (!empty($search_module)) { if ($search_module != -1) { $parts = explode("#~#", $search_module); } } else { return; } if (!empty($parts)) { $viewer->assign("search_module", $parts[0]); $viewer->assign("related_tabid", $parts[1]); $search_module_name = VtUtils::getModuleName($parts[1]); #$workflowSettings = $this->getWorkflow()->getSettings(); $fields = VtUtils::getFieldsWithBlocksForModule($search_module_name); $viewer->assign("sort_fields", $fields); } }