ProcessMaker-BE "DynaForm small fix (DYN_CONTENT)"

- DynaForm small fix (DYN_CONTENT)
This commit is contained in:
Victor Saisa Lopez
2014-06-27 14:48:00 -04:00
parent 58c82213f8
commit 0157f694ea
2 changed files with 7 additions and 6 deletions

View File

@@ -170,6 +170,10 @@ class Dynaform extends BaseDynaform
$this->setDynType( isset( $aData['DYN_TYPE'] ) ? $aData['DYN_TYPE'] : 'xmlform' );
$this->setDynFilename( $aData['PRO_UID'] . PATH_SEP . $dynUid );
if (isset($aData["DYN_CONTENT"])) {
$this->setDynContent($aData["DYN_CONTENT"]);
}
if ($this->validate()) {
$con->begin();
$res = $this->save();

View File

@@ -8,7 +8,8 @@ class DynaForm
"DYN_TITLE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "dynaFormTitle"),
"DYN_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormDescription"),
"DYN_TYPE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("xmlform", "grid"), "fieldNameAux" => "dynaFormType")
"DYN_TYPE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("xmlform", "grid"), "fieldNameAux" => "dynaFormType"),
"DYN_CONTENT" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormContent")
);
private $formatFieldNameInUppercase = true;
@@ -367,10 +368,6 @@ class DynaForm
$dynaFormUid = $dynaForm->create($arrayData);
$oDynaform = \DynaformPeer::retrieveByPK( $dynaFormUid );
$oDynaform->setDynContent( $arrayData['DYN_CONTENT'] );
$oDynaform->save();
//Return
unset($arrayData["PRO_UID"]);
@@ -959,7 +956,7 @@ class DynaForm
$this->getFieldNameByFormatFieldName("DYN_TITLE") => $record["DYN_TITLE"],
$this->getFieldNameByFormatFieldName("DYN_DESCRIPTION") => $record["DYN_DESCRIPTION"] . "",
$this->getFieldNameByFormatFieldName("DYN_TYPE") => $record["DYN_TYPE"] . "",
$this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . ""
$this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . ""
);
} catch (\Exception $e) {
throw $e;