PM-2291 "DesignerBPMN>CaseTracker: No se visualizan los..." SOLVED
> Code Isuue: DesignerBPMN>CaseTracker: No se visualizan los formularios asignados al caseTracker. > Solution: Cuando se tiene dynaforms creados en BPMN al ingresar al case tracker y ver los dynaforms se mostrara con la nueva interfaz en otro caso se mostrara con la antigua interfaz tal como se mostraba anteriormente. Al mostrar el dynaform con la nueva interfaz se tiene un link "Back" que permite volver a la pagina anterior.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* class.pmDynaform.php
|
||||
* Implementing pmDynaform library in the running case.
|
||||
*
|
||||
*
|
||||
* @author Roly Rudy Gutierrez Pinto
|
||||
* @package engine.classes
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ class pmDynaform
|
||||
array_push($json->options, $option);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (isset($json->options[0])) {
|
||||
@@ -225,6 +225,72 @@ class pmDynaform
|
||||
return $this->record != null && $this->record["DYN_VERSION"] == 2 ? true : false;
|
||||
}
|
||||
|
||||
public function printViewWitoutSubmit()
|
||||
{
|
||||
ob_clean();
|
||||
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
|
||||
foreach ($json->items[0]->items as $key => $value) {
|
||||
switch ($json->items[0]->items[$key][0]->type) {
|
||||
case "submit":
|
||||
unset($json->items[0]->items[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$this->jsonr($json);
|
||||
|
||||
$javascript = "
|
||||
<script type=\"text/javascript\">
|
||||
var jsondata = " . G::json_encode($json) . ";
|
||||
var pm_run_outside_main_app = \"\";
|
||||
var dyn_uid = \"" . $this->fields["CURRENT_DYNAFORM"] . "\";
|
||||
var __DynaformName__ = \"" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "\";
|
||||
var app_uid = \"" . $this->fields["APP_UID"] . "\";
|
||||
var prj_uid = \"" . $this->fields["PRO_UID"] . "\";
|
||||
var step_mode = \"\";
|
||||
var workspace = \"" . SYS_SYS . "\";
|
||||
var credentials = " . G::json_encode($this->credentials) . ";
|
||||
var filePost = \"\";
|
||||
var fieldsRequired = null;
|
||||
var triggerDebug = false;
|
||||
|
||||
$(window).load(function ()
|
||||
{
|
||||
var data = jsondata;
|
||||
data.items[0].mode = \"disabled\";
|
||||
|
||||
window.project = new PMDynaform.core.Project({
|
||||
data: data,
|
||||
keys: {
|
||||
server: location.host,
|
||||
projectId: prj_uid,
|
||||
workspace: workspace
|
||||
},
|
||||
token: credentials,
|
||||
submitRest: false
|
||||
});
|
||||
$(document).find(\"form\").submit(function (e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div style=\"margin: 10px 20px 10px 0;\">
|
||||
<div style=\"float: right\"><a href=\"javascript: window.history.go(-1);\" style=\"text-decoration: none;\">< " . G::LoadTranslation("ID_BACK") . "</a></div>
|
||||
<div style=\"clear: both\"></div>
|
||||
</div>
|
||||
";
|
||||
|
||||
$file = file_get_contents(PATH_HOME . "public_html" . PATH_SEP . "lib" . PATH_SEP . "pmdynaform" . PATH_SEP . "build" . PATH_SEP . "pmdynaform.html");
|
||||
$file = str_replace("{javascript}", $javascript, $file);
|
||||
|
||||
echo $file;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
public function printView()
|
||||
{
|
||||
ob_clean();
|
||||
|
||||
Reference in New Issue
Block a user