diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..6867cf8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,38 +1,38 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..72718d5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,20 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/ajax/asynchronousdatas.php b/ajax/asynchronousdatas.php index 5303fb2..879fe59 100644 --- a/ajax/asynchronousdatas.php +++ b/ajax/asynchronousdatas.php @@ -1,47 +1,47 @@ -getFromDB( $datas['id'] ) && $asyncdata->fields['state'] == PluginProcessmakerCrontaskaction::WAITING_DATA) { - $initialdatas = json_decode($asyncdata->fields['postdata'], true); - $initialdatas['form'] = array_merge( $initialdatas['form'], $datas['form'] ); - $postdata = json_encode($initialdatas, JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE); - $asyncdata->update( [ 'id' => $datas['id'], 'state' => PluginProcessmakerCrontaskaction::DATA_READY, 'postdata' => $postdata ] ); - $ret = [ 'code' => '0', 'message' => 'Done' ]; - } else { - $ret = [ 'code' => '2', 'message' => 'Case is not existing, or state is not WAITING_DATA' ]; - } - - break; - default: - $ret = [ 'code' => '1', 'message' => 'Method '.$_SERVER['REQUEST_METHOD'].' not supported' ]; - } - - echo json_encode( $ret, JSON_HEX_APOS | JSON_HEX_QUOT ); - - } -} +getFromDB( $datas['id'] ) && $asyncdata->fields['state'] == PluginProcessmakerCrontaskaction::WAITING_DATA) { + $initialdatas = json_decode($asyncdata->fields['postdata'], true); + $initialdatas['form'] = array_merge( $initialdatas['form'], $datas['form'] ); + $postdata = json_encode($initialdatas, JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE); + $asyncdata->update( [ 'id' => $datas['id'], 'state' => PluginProcessmakerCrontaskaction::DATA_READY, 'postdata' => $postdata ] ); + $ret = [ 'code' => '0', 'message' => 'Done' ]; + } else { + $ret = [ 'code' => '2', 'message' => 'Case is not existing, or state is not WAITING_DATA' ]; + } + + break; + default: + $ret = [ 'code' => '1', 'message' => 'Method '.$_SERVER['REQUEST_METHOD'].' not supported' ]; + } + + echo json_encode( $ret, JSON_HEX_APOS | JSON_HEX_QUOT ); + + } +} diff --git a/ajax/dropdownProcesses.php b/ajax/dropdownProcesses.php index c9c585e..05794a2 100644 --- a/ajax/dropdownProcesses.php +++ b/ajax/dropdownProcesses.php @@ -1,89 +1,89 @@ - 0, - 'text' => $_REQUEST['emptylabel']]); - } - } -} - -$processall = (isset($_REQUEST['specific_tags']['process_restrict']) && !$_REQUEST['specific_tags']['process_restrict']); -$count_cases_per_item = isset($_REQUEST['specific_tags']['count_cases_per_item']) ? $_REQUEST['specific_tags']['count_cases_per_item'] : []; - -$result = PluginProcessmakerProcess::getSqlSearchResult(false, $search); - -//if ($DB->numrows($result)) { -// while ($data = $DB->fetch_array($result)) { -//if ($result->numrows()) { - foreach ($result as $data) { - $process_entities = PluginProcessmakerProcess::getEntitiesForProfileByProcess($data["id"], $_SESSION['glpiactiveprofile']['id'], true); - $can_add = $data['max_cases_per_item'] == 0 || !isset($count_cases_per_item[$data["id"]]) || $count_cases_per_item[$data["id"]] < $data['max_cases_per_item']; - if ($processall - || ($data['maintenance'] != 1 - && in_array( $_REQUEST["entity_restrict"], $process_entities) - && $can_add) ) { - - array_push( $processes, ['id' => $data["id"], - 'text' => $data["name"] - ]); - $count++; - } - } -//} - -$ret['results'] = $processes; -$ret['count'] = $count; -echo json_encode($ret); + 0, + 'text' => $_REQUEST['emptylabel']]); + } + } +} + +$processall = (isset($_REQUEST['specific_tags']['process_restrict']) && !$_REQUEST['specific_tags']['process_restrict']); +$count_cases_per_item = isset($_REQUEST['specific_tags']['count_cases_per_item']) ? $_REQUEST['specific_tags']['count_cases_per_item'] : []; + +$result = PluginProcessmakerProcess::getSqlSearchResult(false, $search); + +//if ($DB->numrows($result)) { +// while ($data = $DB->fetch_array($result)) { +//if ($result->numrows()) { + foreach ($result as $data) { + $process_entities = PluginProcessmakerProcess::getEntitiesForProfileByProcess($data["id"], $_SESSION['glpiactiveprofile']['id'], true); + $can_add = $data['max_cases_per_item'] == 0 || !isset($count_cases_per_item[$data["id"]]) || $count_cases_per_item[$data["id"]] < $data['max_cases_per_item']; + if ($processall + || ($data['maintenance'] != 1 + && in_array( $_REQUEST["entity_restrict"], $process_entities) + && $can_add) ) { + + array_push( $processes, ['id' => $data["id"], + 'text' => $data["name"] + ]); + $count++; + } + } +//} + +$ret['results'] = $processes; +$ret['count'] = $count; +echo json_encode($ret); diff --git a/ajax/dropdownTaskcategories.php b/ajax/dropdownTaskcategories.php index 4fbd0dc..a854273 100644 --- a/ajax/dropdownTaskcategories.php +++ b/ajax/dropdownTaskcategories.php @@ -1,68 +1,68 @@ - 0, -// 'text' => $_REQUEST['emptylabel'])); -// } -// } -//} - -//$result = PluginProcessmakerTaskCategory::getSqlSearchResult(false, $search); - -//if ($DB->numrows($result)) { -// while ($data=$DB->fetch_array($result)) { -// array_push( $taskcategories, array( 'id' => $data["id"], -// 'text' => $data["name"] )); -// $count++; -// } -//} - -//$ret['results'] = $taskcategories; -//$ret['count'] = $count; -//echo json_encode($ret); + 0, +// 'text' => $_REQUEST['emptylabel'])); +// } +// } +//} + +//$result = PluginProcessmakerTaskCategory::getSqlSearchResult(false, $search); + +//if ($DB->numrows($result)) { +// while ($data=$DB->fetch_array($result)) { +// array_push( $taskcategories, array( 'id' => $data["id"], +// 'text' => $data["name"] )); +// $count++; +// } +//} + +//$ret['results'] = $taskcategories; +//$ret['count'] = $count; +//echo json_encode($ret); diff --git a/ajax/dropdownTicketCategories.php b/ajax/dropdownTicketCategories.php index 47d824a..aacf51e 100644 --- a/ajax/dropdownTicketCategories.php +++ b/ajax/dropdownTicketCategories.php @@ -1,40 +1,40 @@ -getFromDB($_POST['value']); - -if ($_POST["type"]) { - switch ($_POST['type']) { - case Ticket::INCIDENT_TYPE : - $opt['condition']['is_incident'] = '1'; - if ($currentcateg->getField('is_incident') == 1) { - $opt['value'] = $_POST['value']; - } - break; - - case Ticket::DEMAND_TYPE: - $opt['condition']['is_request'] = '1'; - if ($currentcateg->getField('is_request') == 1) { - $opt['value'] = $_POST['value']; - } - break; - } -} - -ITILCategory::dropdown($opt); +getFromDB($_POST['value']); + +if ($_POST["type"]) { + switch ($_POST['type']) { + case Ticket::INCIDENT_TYPE : + $opt['condition']['is_incident'] = '1'; + if ($currentcateg->getField('is_incident') == 1) { + $opt['value'] = $_POST['value']; + } + break; + + case Ticket::DEMAND_TYPE: + $opt['condition']['is_request'] = '1'; + if ($currentcateg->getField('is_request') == 1) { + $opt['value'] = $_POST['value']; + } + break; + } +} + +ITILCategory::dropdown($opt); diff --git a/ajax/selfservicedrafts.php b/ajax/selfservicedrafts.php index a4abe2d..ab4fa67 100644 --- a/ajax/selfservicedrafts.php +++ b/ajax/selfservicedrafts.php @@ -1,2 +1,2 @@ -config; - echo "
"; -} - - -// check if it is from PM pages -if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'route' && isset( $_REQUEST['UID'] ) && isset( $_REQUEST['APP_UID'] ) && isset( $_REQUEST['__DynaformName__'] )) { - // then get item id from DB - if ($locCase->getFromGUID($_REQUEST['APP_UID'])) { - $PM_SOAP->derivateCase($locCase, $_REQUEST); - } - glpi_processmaker_case_reload_page(); - -} else if (isset($_REQUEST['purge'])) { - // delete case from case table, this will also delete the tasks - if ($locCase->getFromDB($_REQUEST['id']) && $locCase->deleteCase()) { - Session::addMessageAfterRedirect(__('Case has been deleted!', 'processmaker'), true, INFO); - } else { - Session::addMessageAfterRedirect(__('Unable to delete case!', 'processmaker'), true, ERROR); - } - // will redirect to item or to list if no item - $locCase->redirectToList(); - -} else if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'cancel') { - // cancel case from PM - $locCase = new PluginProcessmakerCase; - $locCase->getFromDB($_POST['cases_id']); - $resultPM = $PM_SOAP->cancelCase($locCase->fields['case_guid']); - if ($resultPM->status_code === 0) { - if ($locCase->cancelCase()) { - Session::addMessageAfterRedirect(__('Case has been cancelled!', 'processmaker'), true, INFO); - } else { - Session::addMessageAfterRedirect(__('Unable to cancel case!', 'processmaker'), true, ERROR); - } - } else { - Session::addMessageAfterRedirect(__('Unable to cancel case!', 'processmaker'), true, ERROR); - } - Html::back(); -} else if (isset( $_REQUEST['form'] ) && isset( $_REQUEST['form']['BTN_CATCH'] ) && isset( $_REQUEST['form']['APP_UID'])) { - // Claim task management - // here we are in a Claim request - $myCase = new PluginProcessmakerCase; - if ($myCase->getFromGUID( $_REQUEST['form']['APP_UID'] )) { - - $pmClaimCase = $PM_SOAP->claimCase($myCase->fields['case_guid'], $_REQUEST['DEL_INDEX'] ); - - // now manage tasks associated with item - $PM_SOAP->claimTask($myCase->getID(), $_REQUEST['DEL_INDEX']); - } - glpi_processmaker_case_reload_page(); - -} else if (isset($_REQUEST['id']) && $_REQUEST['id'] > 0) { - - if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") { - Html::helpHeader(__('Process cases', 'processmaker'), '', $_SESSION["glpiname"]); - } else { - Html::header(__('Process cases', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases"); - } - - if (!$PM_SOAP->config->fields['maintenance']) { - if ($locCase->getFromDB($_REQUEST['id'])) { - $locCase->display($_REQUEST); - } - } else { - PluginProcessmakerProcessmaker::showUnderMaintenance(); - } - - Html::footer(); -} - - - +config; + echo ""; +} + + +// check if it is from PM pages +if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'route' && isset( $_REQUEST['UID'] ) && isset( $_REQUEST['APP_UID'] ) && isset( $_REQUEST['__DynaformName__'] )) { + // then get item id from DB + if ($locCase->getFromGUID($_REQUEST['APP_UID'])) { + $PM_SOAP->derivateCase($locCase, $_REQUEST); + } + glpi_processmaker_case_reload_page(); + +} else if (isset($_REQUEST['purge'])) { + // delete case from case table, this will also delete the tasks + if ($locCase->getFromDB($_REQUEST['id']) && $locCase->deleteCase()) { + Session::addMessageAfterRedirect(__('Case has been deleted!', 'processmaker'), true, INFO); + } else { + Session::addMessageAfterRedirect(__('Unable to delete case!', 'processmaker'), true, ERROR); + } + // will redirect to item or to list if no item + $locCase->redirectToList(); + +} else if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'cancel') { + // cancel case from PM + $locCase = new PluginProcessmakerCase; + $locCase->getFromDB($_POST['cases_id']); + $resultPM = $PM_SOAP->cancelCase($locCase->fields['case_guid']); + if ($resultPM->status_code === 0) { + if ($locCase->cancelCase()) { + Session::addMessageAfterRedirect(__('Case has been cancelled!', 'processmaker'), true, INFO); + } else { + Session::addMessageAfterRedirect(__('Unable to cancel case!', 'processmaker'), true, ERROR); + } + } else { + Session::addMessageAfterRedirect(__('Unable to cancel case!', 'processmaker'), true, ERROR); + } + Html::back(); +} else if (isset( $_REQUEST['form'] ) && isset( $_REQUEST['form']['BTN_CATCH'] ) && isset( $_REQUEST['form']['APP_UID'])) { + // Claim task management + // here we are in a Claim request + $myCase = new PluginProcessmakerCase; + if ($myCase->getFromGUID( $_REQUEST['form']['APP_UID'] )) { + + $pmClaimCase = $PM_SOAP->claimCase($myCase->fields['case_guid'], $_REQUEST['DEL_INDEX'] ); + + // now manage tasks associated with item + $PM_SOAP->claimTask($myCase->getID(), $_REQUEST['DEL_INDEX']); + } + glpi_processmaker_case_reload_page(); + +} else if (isset($_REQUEST['id']) && $_REQUEST['id'] > 0) { + + if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") { + Html::helpHeader(__('Process cases', 'processmaker'), '', $_SESSION["glpiname"]); + } else { + Html::header(__('Process cases', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases"); + } + + if (!$PM_SOAP->config->fields['maintenance']) { + if ($locCase->getFromDB($_REQUEST['id'])) { + $locCase->display($_REQUEST); + } + } else { + PluginProcessmakerProcessmaker::showUnderMaintenance(); + } + + Html::footer(); +} + + + diff --git a/front/caselink.form.php b/front/caselink.form.php index 775daac..e91f50b 100644 --- a/front/caselink.form.php +++ b/front/caselink.form.php @@ -1,34 +1,34 @@ -check($_REQUEST['id'], UPDATE); - $PluginCaselink->update($_REQUEST); - Html::back(); -} else if (isset($_REQUEST['add'])) { - $PluginCaselink->check($_REQUEST['id'], UPDATE); - $PluginCaselink->add($_REQUEST); - Html::back(); -} else if (isset($_REQUEST['purge'])) { - $PluginCaselink->check($_REQUEST['id'], PURGE); - $PluginCaselink->delete($_REQUEST, true); - $PluginCaselink->redirectToList(); -} else { - - Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "caselinks"); - - $PluginCaselink->display($_REQUEST); - - Html::footer(); -} +check($_REQUEST['id'], UPDATE); + $PluginCaselink->update($_REQUEST); + Html::back(); +} else if (isset($_REQUEST['add'])) { + $PluginCaselink->check($_REQUEST['id'], UPDATE); + $PluginCaselink->add($_REQUEST); + Html::back(); +} else if (isset($_REQUEST['purge'])) { + $PluginCaselink->check($_REQUEST['id'], PURGE); + $PluginCaselink->delete($_REQUEST, true); + $PluginCaselink->redirectToList(); +} else { + + Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "caselinks"); + + $PluginCaselink->display($_REQUEST); + + Html::footer(); +} diff --git a/front/caselink.php b/front/caselink.php index fb11f5c..99390f4 100644 --- a/front/caselink.php +++ b/front/caselink.php @@ -1,15 +1,15 @@ -check($_POST['id'], UPDATE); - - // save - $config->update($_POST); - - - Html::back(); - -} else if (isset($_POST["refresh"])) { - $config->refresh($_POST); // used to refresh process list, task category list - Html::back(); -} - -Html::redirect($CFG_GLPI["root_doc"]."/front/config.form.php?forcetab=". - urlencode('PluginProcessmakerConfig$1')); +check($_POST['id'], UPDATE); + + // save + $config->update($_POST); + + + Html::back(); + +} else if (isset($_POST["refresh"])) { + $config->refresh($_POST); // used to refresh process list, task category list + Html::back(); +} + +Html::redirect($CFG_GLPI["root_doc"]."/front/config.form.php?forcetab=". + urlencode('PluginProcessmakerConfig$1')); diff --git a/front/process.form.php b/front/process.form.php index 26dc7a7..f015fdf 100644 --- a/front/process.form.php +++ b/front/process.form.php @@ -1,32 +1,32 @@ -check($_REQUEST['id'], UPDATE); - $PluginProcess->update($_REQUEST); - Html::back(); - -} else if (isset($_REQUEST["refreshtask"])) { - $PluginProcess->check($_REQUEST['id'], UPDATE); - $PluginProcess->refreshTasks($_REQUEST); - Html::back(); - -} else { - - Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "processes"); - - $PluginProcess->display($_REQUEST); - - Html::footer(); -} +check($_REQUEST['id'], UPDATE); + $PluginProcess->update($_REQUEST); + Html::back(); + +} else if (isset($_REQUEST["refreshtask"])) { + $PluginProcess->check($_REQUEST['id'], UPDATE); + $PluginProcess->refreshTasks($_REQUEST); + Html::back(); + +} else { + + Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "tools", "PluginProcessmakerMenu", "processes"); + + $PluginProcess->display($_REQUEST); + + Html::footer(); +} diff --git a/front/process.php b/front/process.php index 4b8a84a..83eec43 100644 --- a/front/process.php +++ b/front/process.php @@ -1,23 +1,23 @@ -refresh(); - Html::back(); - } - - $process->title(); - - Search::show('PluginProcessmakerProcess'); - -} else { - Html::displayRightError(); -} -Html::footer(); - +refresh(); + Html::back(); + } + + $process->title(); + + Search::show('PluginProcessmakerProcess'); + +} else { + Html::displayRightError(); +} +Html::footer(); + diff --git a/front/process_profile.form.php b/front/process_profile.form.php index 18d0460..95081f1 100644 --- a/front/process_profile.form.php +++ b/front/process_profile.form.php @@ -1,16 +1,16 @@ -check(-1, UPDATE, $_POST); - $right->add($_POST); - Html::back(); -} - -Html::displayErrorAndDie("lost"); +check(-1, UPDATE, $_POST); + $right->add($_POST); + Html::back(); +} + +Html::displayErrorAndDie("lost"); diff --git a/inc/casechangelog.class.php b/inc/casechangelog.class.php index 34c73e9..89029b0 100644 --- a/inc/casechangelog.class.php +++ b/inc/casechangelog.class.php @@ -1,38 +1,38 @@ -serverURL."/cases/ajaxListener?action=changeLogHistory&rand=$rand"; - - $PM_SOAP->echoDomain(); - echo ""; //?rand=$rand' - - $iframe = ""; - - $PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand); - - } - - function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) { - return __('Change log', 'processmaker'); - } -} +serverURL."/cases/ajaxListener?action=changeLogHistory&rand=$rand"; + + $PM_SOAP->echoDomain(); + echo ""; //?rand=$rand' + + $iframe = ""; + + $PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand); + + } + + function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) { + return __('Change log', 'processmaker'); + } +} diff --git a/inc/casedynaform.class.php b/inc/casedynaform.class.php index 29d5a24..46c5b7e 100644 --- a/inc/casedynaform.class.php +++ b/inc/casedynaform.class.php @@ -1,86 +1,86 @@ -config; - $rand = rand(); - - $proj = new PluginProcessmakerProcess; - $proj->getFromDB($case->fields['plugin_processmaker_processes_id']); - - $PM_SOAP->echoDomain(); - echo ""; //?rand=$rand' - - echo ""; - - $caseURL = $PM_SOAP->serverURL."/cases/casesHistoryDynaformPage_Ajax?actionAjax=historyDynaformPage&rand=$rand"; - - $iframe = ""; - - $PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand); - - } - - function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) { - return __('Dynaforms', 'processmaker'); - } - -} +config; + $rand = rand(); + + $proj = new PluginProcessmakerProcess; + $proj->getFromDB($case->fields['plugin_processmaker_processes_id']); + + $PM_SOAP->echoDomain(); + echo ""; //?rand=$rand' + + echo ""; + + $caseURL = $PM_SOAP->serverURL."/cases/casesHistoryDynaformPage_Ajax?actionAjax=historyDynaformPage&rand=$rand"; + + $iframe = ""; + + $PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand); + + } + + function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) { + return __('Dynaforms', 'processmaker'); + } + +} diff --git a/inc/casehistory.class.php b/inc/casehistory.class.php index de31e17..d660699 100644 --- a/inc/casehistory.class.php +++ b/inc/casehistory.class.php @@ -1,38 +1,38 @@ -serverURL - ."/cases/ajaxListener?action=caseHistory&rand=$rand"; - - $PM_SOAP->echoDomain(); - echo ""; - - $iframe = ""; - - $PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand); - - } - - function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) { - return __('History', 'processmaker'); - } -} +serverURL + ."/cases/ajaxListener?action=caseHistory&rand=$rand"; + + $PM_SOAP->echoDomain(); + echo ""; + + $iframe = ""; + + $PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand); + + } + + function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) { + return __('History', 'processmaker'); + } +} diff --git a/inc/caselink.class.php b/inc/caselink.class.php index 5f13fe1..36dd20d 100644 --- a/inc/caselink.class.php +++ b/inc/caselink.class.php @@ -1,285 +1,285 @@ -1) { - return __('Case-links', 'processmaker'); - } - return __('Case-link', 'processmaker'); - } - - function showForm ($ID, $options = ['candel'=>false]) { - global $DB, $CFG_GLPI; - - $options['candel'] = true; - - $this->initForm($ID, $options); - $this->showFormHeader($options); - - echo "