diff --git a/Rakefile b/Rakefile
index a43a131b5..8c314a6fc 100644
--- a/Rakefile
+++ b/Rakefile
@@ -192,7 +192,7 @@ def buildPmdynaform(homeDir, targetDir, mode)
template += s
end
- htmlTemplates=["cases_Step_Pmdynaform.html","cases_Step_Pmdynaform_Preview.html","cases_Step_Pmdynaform_View.html","WebEntry_Pmdynaform.html"]
+ htmlTemplates=["pmdynaform.html"]
htmlTemplates.each do |htmlTemplate|
FileUtils.cp("#{Dir.pwd}/workflow/engine/templates/cases/#{htmlTemplate}", "#{pmdynaformDir}/build/#{htmlTemplate}")
diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php
index c3cdd9449..5038af110 100644
--- a/workflow/engine/classes/class.pmDynaform.php
+++ b/workflow/engine/classes/class.pmDynaform.php
@@ -11,86 +11,26 @@ class pmDynaform
{
public static $instance = null;
+ private $debugMode = false;
public $dyn_uid = null;
public $record = null;
public $app_data = null;
+ public $credentials = null;
public $items = array();
public $data = array();
public $variables = array();
- public $arrayFieldRequired = array();
+ public $arrayFieldRequired = array();
public function __construct($dyn_uid, $app_data = array())
- {
+ {
$this->dyn_uid = $dyn_uid;
$this->app_data = $app_data;
$this->getDynaform();
-
- //items
- $dynContent = G::json_decode($this->record["DYN_CONTENT"]);
- if (isset($dynContent->items)) {
- $this->items = $dynContent->items[0]->items;
- $n = count($this->items);
- for ($i = 0; $i < $n; $i++) {
- $m = count($this->items[$i]);
- for ($j = 0; $j < $m; $j++) {
- if (isset($this->items[$i][$j]->required) && $this->items[$i][$j]->required == 1) {
- array_push($this->arrayFieldRequired, $this->items[$i][$j]->name);
- }
- }
- }
- }
-
- if(!empty($app_data) && isset($app_data["APPLICATION"])){
- //data
+ $this->getCredentials();
+ if (isset($app_data["APPLICATION"])) {
$cases = new \ProcessMaker\BusinessModel\Cases();
$this->data = $cases->getCaseVariables($app_data["APPLICATION"]);
-
- //variables
- $this->variables = array();
-
- $a = new Criteria("workflow");
- $a->addSelectColumn(ProcessVariablesPeer::VAR_NAME);
- $a->addSelectColumn(ProcessVariablesPeer::VAR_SQL);
- $a->addSelectColumn(ProcessVariablesPeer::VAR_ACCEPTED_VALUES);
- $a->addSelectColumn(ProcessVariablesPeer::VAR_DBCONNECTION);
-
- $c3 = $a->getNewCriterion(ProcessVariablesPeer::VAR_ACCEPTED_VALUES, "", Criteria::ALT_NOT_EQUAL);
- $c2 = $a->getNewCriterion(ProcessVariablesPeer::VAR_ACCEPTED_VALUES, "[]", Criteria::ALT_NOT_EQUAL);
- $c2->addAnd($c3);
-
- $c4 = $a->getNewCriterion(ProcessVariablesPeer::PRJ_UID, $this->app_data["PROCESS"], Criteria::EQUAL);
-
- $c1 = $a->getNewCriterion(ProcessVariablesPeer::VAR_SQL, "", Criteria::ALT_NOT_EQUAL);
- $c1->addOr($c2);
- $c1->addAnd($c4);
-
- $a->add($c1);
-
- $ds = ProcessPeer::doSelectRS($a);
- $ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
-
- while ($ds->next()) {
- $row = $ds->getRow();
- //options
- $rows2 = G::json_decode($row["VAR_ACCEPTED_VALUES"]);
- $n = count($rows2);
- for ($i = 0; $i < $n; $i++) {
- $rows2[$i] = array($rows2[$i]->keyValue, $rows2[$i]->value);
- }
- //query
- $arrayVariable = array();
- if ($row["VAR_DBCONNECTION"] !== "none" && $row["VAR_SQL"] !== "") {
- $cnn = Propel::getConnection($row["VAR_DBCONNECTION"]);
- $stmt = $cnn->createStatement();
- $rs = $stmt->executeQuery(\G::replaceDataField($row["VAR_SQL"], $arrayVariable), \ResultSet::FETCHMODE_NUM);
- while ($rs->next()) {
- array_push($rows2, $rs->getRow());
- }
- }
- $this->variables[$row["VAR_NAME"]] = $rows2;
- }
}
-
}
public function getDynaform()
@@ -107,96 +47,114 @@ class pmDynaform
$ds = ProcessPeer::doSelectRS($a);
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$ds->next();
- $row = $ds->getRow();
+ $row = $ds->getRow();
$this->record = isset($row) ? $row : null;
-
return $this->record;
}
-
- private function searchValues($varName, $value)
+
+ public function getCredentials()
{
- if (!$varName || !isset($this->variables[$varName])) {
- return "";
- }
- $options = $this->variables[$varName];
- foreach ($options as $valueOptions) {
- if ($valueOptions[0] === $value) {
- return $valueOptions[1];
- }
+ if ($this->credentials != null) {
+ return $this->credentials;
}
+ $a = $this->clientToken();
+ $this->credentials = array(
+ "accessToken" => $a["access_token"],
+ "expiresIn" => $a["expires_in"],
+ "tokenType" => $a["token_type"],
+ "scope" => $a["scope"],
+ "refreshToken" => $a["refresh_token"],
+ "clientId" => $a["client_id"],
+ "clientSecret" => $a["client_secret"]
+ );
+ return $this->credentials;
}
- private function mergeAppData($app_uid, &$items)
+ public function jsonr(&$json)
{
- foreach ($items as $key => $value) {
- if (is_array($items[$key])) {
- $this->mergeAppData($app_uid, $items[$key]);
- } else {
- if (isset($items[$key]->name) && isset($this->data[$items[$key]->name])) {
- if ($items[$key]->type === "grid") {
- $rows = $this->data[$items[$key]->name];
+ foreach ($json as $key => $value) {
+ $sw1 = is_array($value);
+ $sw2 = is_object($value);
+ if ($sw1 || $sw2) {
+ $this->jsonr($value);
+ }
+ if (!$sw1 && !$sw2) {
+ //property
+ $prefixs = array("@@", "@#", "@%", "@?", "@$", "@=");
+ if (is_string($value) && in_array(substr($value, 0, 2), $prefixs)) {
+ $triggerValue = substr($value, 2);
+ if (isset($this->app_data[$triggerValue])) {
+ $json->$key = $this->app_data[$triggerValue];
+ }
+ }
+ //data
+ if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "dropdown")) {
+ $json->data = array(
+ "value" => isset($this->data[$json->name]) ? $this->data[$json->name] : "",
+ "label" => isset($this->data[$json->name . "_label"]) ? $this->data[$json->name . "_label"] : ""
+ );
+ }
+ if ($key === "type" && ($value === "suggets")) {
+ $json->data = array(
+ "value" => isset($this->data[$json->name . "_label"]) ? $this->data[$json->name . "_label"] : "",
+ "label" => isset($this->data[$json->name]) ? $this->data[$json->name] : ""
+ );
+ }
+ //query & options
+ if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "dropdown" || $value === "suggets")) {
+ if (!isset($json->dbConnection))
+ $json->dbConnection = "none";
+ if (!isset($json->sql))
+ $json->sql = "";
+ if (!isset($json->options))
+ $json->options = array();
+ if ($json->dbConnection !== "none" && $json->sql !== "") {
+ $cnn = Propel::getConnection($json->dbConnection);
+ $stmt = $cnn->createStatement();
+ $rs = $stmt->executeQuery(\G::replaceDataField($json->sql, array()), \ResultSet::FETCHMODE_NUM);
+ while ($rs->next()) {
+ $row = $rs->getRow();
+ $option = array(
+ "label" => $row[1],
+ "value" => $row[0]
+ );
+ array_push($json->options, $option);
+ }
+ $json->data = isset($json->options[0]) ? $json->options[0] : $json->data;
+ }
+ }
+ //grid
+ if ($key === "type" && ($value === "grid")) {
+ if (isset($this->data[$json->name])) {
+ //rows
+ $rows = $this->data[$json->name];
foreach ($rows as $keyRow => $row) {
- $newRow = array();
- foreach ($row as $keyCelda => $celda) {
- array_push($newRow, array(
- "value" => $celda,
- "label" => $this->searchValues($keyCelda, $celda)
- ));
+ //cells
+ $cells = array();
+ foreach ($json->columns as $column) {
+ //data
+ if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown") {
+ array_push($cells, array(
+ "value" => $row[$column->name],
+ "label" => $row[$column->name . "_label"]
+ ));
+ }
+ if ($column->type === "suggest") {
+ array_push($cells, array(
+ "value" => $row[$column->name . "_label"],
+ "label" => $row[$column->name]
+ ));
+ }
}
- $rows[$keyRow] = $newRow;
+ $rows[$keyRow] = $cells;
}
- $items[$key]->rows = count($rows);
- $items[$key]->data = $rows;
+ $json->rows = count($rows);
+ $json->data = $rows;
}
- if ($items[$key]->type !== "grid") {
- $value = $this->data[$items[$key]->name];
- $label = "";
- if (isset($this->data[$items[$key]->name . "_label"])) {
- $value = $this->data[$items[$key]->name];
- $label = $this->data[$items[$key]->name . "_label"];
- }
- if (isset($this->data[$items[$key]->name . "_value"])) {
- $value = $this->data[$items[$key]->name . "_value"];
- $label = $this->data[$items[$key]->name];
- }
- $items[$key]->data = array(
- "value" => $value,
- "label" => $label
- );
- }
- }
- if (isset($items[$key]->options) && isset($this->variables[$items[$key]->name])) {
- $options = $this->variables[$items[$key]->name];
- $n = count($options);
- for ($i = 0; $i < $n; $i++) {
- $options[$i] = array(
- "value" => $options[$i][0],
- "label" => $options[$i][1]
- );
- }
- $items[$key]->options = $options;
- }
- if (isset($items[$key]->columns)) {
- $this->mergeAppData($app_uid, $items[$key]->columns);
}
}
}
}
-
- public function mergeDynContentAppData($app_uid, &$items)
- {
- $dynContent = G::json_decode($this->record["DYN_CONTENT"]);
- if (isset($dynContent->items)) {
- $this->items = $dynContent->items[0]->items;
- }
-
- $this->mergeAppData($app_uid, $items);
- $dynContent->items[0]->items = $this->items;
-
- $a = G::json_encode($dynContent);
- $a = str_replace("\/", "/", $a);
- $this->record["DYN_CONTENT"] = $a;
- }
public function isResponsive()
{
@@ -206,8 +164,9 @@ class pmDynaform
public function printView($pm_run_outside_main_app, $application)
{
ob_clean();
- $this->mergeDynContentAppData($application, $this->items);
-
+ $json = G::json_decode($this->record["DYN_CONTENT"]);
+ $this->jsonr($json);
+
$a = $this->clientToken();
$clientToken = array(
"accessToken" => $a["access_token"],
@@ -218,16 +177,44 @@ class pmDynaform
"clientId" => $a["client_id"],
"clientSecret" => $a["client_secret"]
);
-
- $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/cases_Step_Pmdynaform_View.html');
- $file = str_replace("{JSON_DATA}", $this->record["DYN_CONTENT"], $file);
- $file = str_replace("{PM_RUN_OUTSIDE_MAIN_APP}", $pm_run_outside_main_app, $file);
- $file = str_replace("{DYN_UID}", $this->dyn_uid, $file);
- $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("{WORKSPACE}", $this->app_data["SYS_SYS"], $file);
- $file = str_replace("{credentials}", json_encode($clientToken), $file);
+
+ $javascrip = "" .
+ "\n";
+
+ $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
+ $file = str_replace("{javascript}", $javascrip, $file);
+
+ $this->debug();
echo $file;
exit();
}
@@ -235,34 +222,43 @@ class pmDynaform
public function printEdit($pm_run_outside_main_app, $application, $headData, $step_mode = 'EDIT')
{
ob_clean();
- $this->mergeDynContentAppData($application, $this->items);
-
- $a = $this->clientToken();
- $clientToken = array(
- "accessToken" => $a["access_token"],
- "expiresIn" => $a["expires_in"],
- "tokenType" => $a["token_type"],
- "scope" => $a["scope"],
- "refreshToken" => $a["refresh_token"],
- "clientId" => $a["client_id"],
- "clientSecret" => $a["client_secret"]
- );
+ $json = G::json_decode($this->record["DYN_CONTENT"]);
+ $this->jsonr($json);
+ $javascrip = "" .
+ "\n" .
+ "\n" .
+ "\n" .
+ "
\n" .
+ " \n" .
+ " | " . $headData["CASE"] . " #: " . $headData["APP_NUMBER"] . " " . $headData["TITLE"] . ": " . $headData["APP_TITLE"] . " | \n" .
+ "
\n" .
+ "
\n" .
+ "";
- $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/cases_Step_Pmdynaform.html');
- $file = str_replace("{JSON_DATA}", $this->record["DYN_CONTENT"], $file);
- $file = str_replace("{CASE}", $headData["CASE"], $file);
- $file = str_replace("{APP_NUMBER}", $headData["APP_NUMBER"], $file);
- $file = str_replace("{TITLE}", $headData["TITLE"], $file);
- $file = str_replace("{APP_TITLE}", $headData["APP_TITLE"], $file);
- $file = str_replace("{PM_RUN_OUTSIDE_MAIN_APP}", $pm_run_outside_main_app, $file);
- $file = str_replace("{DYN_UID}", $this->dyn_uid, $file);
- $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("{PORT}", $_SERVER["SERVER_PORT"] , $file);
- $file = str_replace("{credentials}", G::json_encode($clientToken), $file);
+ $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
+ $file = str_replace("{javascript}", $javascrip, $file);
+
+ $this->debug();
echo $file;
exit();
}
@@ -270,25 +266,51 @@ class pmDynaform
public function printWebEntry($filename)
{
ob_clean();
- $a = $this->clientToken();
- $clientToken = array(
- "accessToken" => $a["access_token"],
- "expiresIn" => $a["expires_in"],
- "tokenType" => $a["token_type"],
- "scope" => $a["scope"],
- "refreshToken" => $a["refresh_token"],
- "clientId" => $a["client_id"],
- "clientSecret" => $a["client_secret"]
- );
- $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/WebEntry_Pmdynaform.html');
- $file = str_replace("{JSON_DATA}", $this->record["DYN_CONTENT"], $file);
- $file = str_replace("{DYN_UID}", $this->dyn_uid, $file);
- $file = str_replace("{PRJ_UID}",$this->record["PRO_UID"], $file);
- $file = str_replace("{WORKSPACE}", SYS_SYS, $file);
- $file = str_replace("{FILEPOST}", $filename, $file);
- $file = str_replace("{PORT}", $_SERVER["SERVER_PORT"] , $file);
- $file = str_replace("{credentials}", G::json_encode($clientToken), $file);
- $file = str_replace("{FIELDSREQUIRED}", G::json_encode($this->arrayFieldRequired), $file);
+ $json = G::json_decode($this->record["DYN_CONTENT"]);
+ $this->jsonr($json);
+ $javascrip = "" .
+ "\n" .
+ "\n" .
+ "";
+
+ $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
+ $file = str_replace("{javascript}", $javascrip, $file);
+
+ $this->debug();
+ echo $file;
+ exit();
+ }
+
+ public function printPmDynaform()
+ {
+ $json = G::json_decode($this->record["DYN_CONTENT"]);
+ $this->jsonr($json);
+ $javascrip = "" .
+ "";
+
+ $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
+ $file = str_replace("{javascript}", $javascrip, $file);
+
+ $this->debug();
echo $file;
exit();
}
@@ -360,4 +382,13 @@ class pmDynaform
return array('dsn' => $dsn, 'username' => DB_USER, 'password' => DB_PASS);
}
+ private function debug()
+ {
+ if ($this->debugMode) {
+ echo "";
+ echo G::json_encode($json);
+ echo "
";
+ }
+ }
+
}
diff --git a/workflow/engine/js/cases/core/cases_Step_Pmdynaform.js b/workflow/engine/js/cases/core/pmDynaform.js
similarity index 88%
rename from workflow/engine/js/cases/core/cases_Step_Pmdynaform.js
rename to workflow/engine/js/cases/core/pmDynaform.js
index e3c6fefdd..62030d439 100644
--- a/workflow/engine/js/cases/core/cases_Step_Pmdynaform.js
+++ b/workflow/engine/js/cases/core/pmDynaform.js
@@ -26,14 +26,13 @@ $(window).load(function () {
if (parent.showCaseNavigatorPanel) {
parent.showCaseNavigatorPanel('DRAFT');
}
-
if (parent.setCurrent) {
parent.setCurrent(dyn_uid);
}
}
-
var data = jsondata;
- data.items[0].mode = step_mode.toLowerCase();
+ if (step_mode)
+ data.items[0].mode = step_mode.toLowerCase();
window.project = new PMDynaform.core.Project({
data: data,
keys: {
@@ -69,8 +68,12 @@ $(window).load(function () {
appuid.type = "hidden";
appuid.name = "APP_UID";
appuid.value = app_uid;
+ var arrayRequired = document.createElement("input");
+ arrayRequired.type = "hidden";
+ arrayRequired.name = "DynaformRequiredFields";
+ arrayRequired.value = fieldsRequired;
var form = document.getElementsByTagName("form")[0];
- form.action = "cases_SaveData?UID=" + dyn_uid + "&APP_UID=" + app_uid;
+ form.action = filePost ? filePost : "cases_SaveData?UID=" + dyn_uid + "&APP_UID=" + app_uid;
form.method = "post";
form.enctype = "multipart/form-data";
form.appendChild(type);
@@ -79,7 +82,7 @@ $(window).load(function () {
form.appendChild(action);
form.appendChild(dynaformname);
form.appendChild(appuid);
-
+ form.appendChild(arrayRequired);
var dyn_forward = document.getElementById("dyn_forward");
dyn_forward.onclick = function () {
form.submit();
diff --git a/workflow/engine/js/cases/core/webentry_pmdynaform.js b/workflow/engine/js/cases/core/webentry_pmdynaform.js
deleted file mode 100644
index 65b358f90..000000000
--- a/workflow/engine/js/cases/core/webentry_pmdynaform.js
+++ /dev/null
@@ -1,86 +0,0 @@
-function dynaFormChanged(frm) {
- for (var i1 = 0; i1 <= frm.elements.length - 1; i1++) {
- if ((frm.elements[i1].type === "radio" || frm.elements[i1].type === "checkbox") && (frm.elements[i1].checked !== frm.elements[i1].defaultChecked)) {
- return true;
- }
- if ((frm.elements[i1].type === "textarea" || frm.elements[i1].type === "text" || frm.elements[i1].type === "file") && (frm.elements[i1].value !== frm.elements[i1].defaultValue)) {
- return true;
- }
- if (frm.elements[i1].tagName.toLowerCase() === "select") {
- var selectDefaultValue = frm.elements[i1].value;
- for (var i2 = 0; i2 <= frm.elements[i1].options.length - 1; i2++) {
- if (frm.elements[i1].options[i2].defaultSelected) {
- selectDefaultValue = frm.elements[i1].options[i2].value;
- break;
- }
- }
- if (frm.elements[i1].value !== selectDefaultValue) {
- return true;
- }
- }
- }
- return false;
-}
-$(window).load(function () {
- /*if ((navigator.userAgent.indexOf("MSIE") !== -1) || (navigator.userAgent.indexOf("Trident") !== -1)) {
- document.body.innerHTML = "Responsive Dynaforms are not supported in this browser.
";
- return;
- }*/
- var data = jsondata;
- window.project = new PMDynaform.core.Project({
- data: data,
- keys: {
- server: location.host,
- projectId: prj_uid,
- workspace: workspace
- },
- token: credentials,
- submitRest: false
- });
-
- var type = document.createElement("input");
- type.type = "hidden";
- type.name = "TYPE";
- type.value = "ASSIGN_TASK";
- var uid = document.createElement("input");
- uid.type = "hidden";
- uid.name = "UID";
- uid.value = dyn_uid;
- var position = document.createElement("input");
- position.type = "hidden";
- position.name = "POSITION";
- position.value = "10000";
- var action = document.createElement("input");
- action.type = "hidden";
- action.name = "ACTION";
- action.value = "ASSIGN";
- var dynaformname = document.createElement("input");
- dynaformname.type = "hidden";
- dynaformname.name = "__DynaformName__";
- //dynaformname.value = __DynaformName__;
- var appuid = document.createElement("input");
- appuid.type = "hidden";
- appuid.name = "APP_UID";
-
- var arrayRequired = document.createElement("input");
- arrayRequired.type = "hidden";
- arrayRequired.name = "DynaformRequiredFields";
- arrayRequired.value = fieldsRequired;
- //appuid.value = app_uid;
- var form = document.getElementsByTagName("form")[0];
- form.action = filePost;
- form.method = "post";
- form.appendChild(type);
- form.appendChild(uid);
- form.appendChild(position);
- form.appendChild(action);
- form.appendChild(dynaformname);
- form.appendChild(appuid);
- form.appendChild(arrayRequired);
-
- var dyn_forward = document.getElementById("dyn_forward");
- dyn_forward.onclick = function () {
- form.submit();
- return false;
- };
-});
\ No newline at end of file
diff --git a/workflow/engine/methods/cases/pmDynaform.php b/workflow/engine/methods/cases/pmDynaform.php
new file mode 100644
index 000000000..90a97bf9c
--- /dev/null
+++ b/workflow/engine/methods/cases/pmDynaform.php
@@ -0,0 +1,6 @@
+printPmDynaform();
diff --git a/workflow/engine/templates/cases/WebEntry_Pmdynaform.html b/workflow/engine/templates/cases/WebEntry_Pmdynaform.html
deleted file mode 100644
index d55f866f5..000000000
--- a/workflow/engine/templates/cases/WebEntry_Pmdynaform.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- PMDynaform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ###TEMPLATES###
-
-
-
-
-
-
-
-
diff --git a/workflow/engine/templates/cases/cases_Step_Pmdynaform.html b/workflow/engine/templates/cases/cases_Step_Pmdynaform.html
deleted file mode 100644
index d0e8be781..000000000
--- a/workflow/engine/templates/cases/cases_Step_Pmdynaform.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- PMDynaform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ###TEMPLATES###
-
-
-
-
-
-
-
- | {CASE} #: {APP_NUMBER} {TITLE}: {APP_TITLE} |
-
-
-
-
-
diff --git a/workflow/engine/templates/cases/cases_Step_Pmdynaform_View.html b/workflow/engine/templates/cases/cases_Step_Pmdynaform_View.html
deleted file mode 100644
index 3095232ed..000000000
--- a/workflow/engine/templates/cases/cases_Step_Pmdynaform_View.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- PMDynaform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ###TEMPLATES###
-
-
-
-
-
diff --git a/workflow/engine/templates/cases/cases_Step_Pmdynaform_Preview.html b/workflow/engine/templates/cases/pmdynaform.html
similarity index 85%
rename from workflow/engine/templates/cases/cases_Step_Pmdynaform_Preview.html
rename to workflow/engine/templates/cases/pmdynaform.html
index ce7acbd52..e3920be59 100644
--- a/workflow/engine/templates/cases/cases_Step_Pmdynaform_Preview.html
+++ b/workflow/engine/templates/cases/pmdynaform.html
@@ -13,13 +13,13 @@
-
-
+
+
###TEMPLATES###
-
+ {javascript}