IMPROVEMENT PM-1338 Running cases step_mode 'EDIT' & 'VIEW'

This commit is contained in:
Roly Rudy Gutierrez Pinto
2015-01-23 11:54:59 -04:00
parent 130e631663
commit dbd751038e
4 changed files with 5 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ class pmDynaform
exit();
}
public function printEdit($pm_run_outside_main_app, $application, $headData)
public function printEdit($pm_run_outside_main_app, $application, $headData, $step_mode = 'EDIT')
{
ob_clean();
@@ -101,6 +101,7 @@ class pmDynaform
$file = str_replace("{DYNAFORMNAME}", $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"], $file);
$file = str_replace("{APP_UID}", $application, $file);
$file = str_replace("{PRJ_UID}", $this->app_data["PROCESS"], $file);
$file = str_replace("{STEP_MODE}", $step_mode, $file);
$file = str_replace("{WORKSPACE}", $this->app_data["SYS_SYS"], $file);
$file = str_replace("{credentials}", json_encode($clientToken), $file);
echo $file;

View File

@@ -37,6 +37,7 @@ $(window).load(function () {
}
var data = jsondata;
data.items[0].mode = step_mode.toLowerCase();
window.project = new PMDynaform.core.Project({
data: data,
keys: {

View File

@@ -264,7 +264,7 @@ try {
G::LoadClass('pmDynaform');
$a = new pmDynaform($_GET['UID'], $Fields['APP_DATA']);
if ($a->isResponsive()) {
$a->printEdit((!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) ? "true" : "false", $_SESSION['APPLICATION'], $array);
$a->printEdit((!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) ? "true" : "false", $_SESSION['APPLICATION'], $array, $oStep->getStepMode());
} else {
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['UID'], '', $Fields['APP_DATA'], 'cases_SaveData?UID=' . $_GET['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'], '', (strtolower($oStep->getStepMode()) != 'edit' ? strtolower($oStep->getStepMode()) : ''));
}

View File

@@ -25,6 +25,7 @@
var __DynaformName__ = '{DYNAFORMNAME}';
var app_uid = '{APP_UID}';
var prj_uid = '{PRJ_UID}';
var step_mode = '{STEP_MODE}';
var workspace = '{WORKSPACE}';
var credentials = {credentials};
</script>