Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-939
This commit is contained in:
File diff suppressed because it is too large
Load Diff
2
workflow/engine/classes/model/BpmnLane.php
Normal file → Executable file
2
workflow/engine/classes/model/BpmnLane.php
Normal file → Executable file
@@ -78,7 +78,7 @@ class BpmnLane extends BaseBpmnLane {
|
||||
if (! is_null($prjUid)) {
|
||||
$c->add(BpmnLanePeer::PRJ_UID, $prjUid, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$c->addAscendingOrderByColumn(BpmnBoundPeer::BOU_REL_POSITION);
|
||||
$rs = BpmnLanePeer::doSelectRS($c);
|
||||
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ class Dynaform extends BaseDynaform
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function create ($aData)
|
||||
public function create ($aData, $pmTableUid='')
|
||||
{
|
||||
if (! isset( $aData['PRO_UID'] )) {
|
||||
throw (new PropelException( 'The dynaform cannot be created. The PRO_UID is empty.' ));
|
||||
@@ -194,6 +194,17 @@ class Dynaform extends BaseDynaform
|
||||
}
|
||||
|
||||
$con->commit();
|
||||
|
||||
//Add Audit Log
|
||||
$mode = isset($aData['MODE'])? $aData['MODE'] : 'Determined by Fields';
|
||||
$description = "";
|
||||
if($pmTableUid!=''){
|
||||
$pmTable = AdditionalTablesPeer::retrieveByPK( $pmTableUid );
|
||||
$addTabName = $pmTable->getAddTabName();
|
||||
$description = "Create from a PM Table: ".$addTabName.", ";
|
||||
}
|
||||
G::auditLog("CreateDynaform", $description."Dynaform Title: ".$aData['DYN_TITLE'].", Type: ".$aData['DYN_TYPE'].", Description: ".$aData['DYN_DESCRIPTION'].", Mode: ".$mode);
|
||||
|
||||
$sXml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
|
||||
$sXml .= '<dynaForm type="' . $this->getDynType() . '" name="' . $this->getProUid() . '/' . $this->getDynUid() . '" width="500" enabletemplate="0" mode="" nextstepsave="prompt">' . "\n";
|
||||
$sXml .= '</dynaForm>';
|
||||
@@ -232,7 +243,7 @@ class Dynaform extends BaseDynaform
|
||||
|
||||
public function createFromPMTable ($aData, $pmTableUid)
|
||||
{
|
||||
$this->create( $aData );
|
||||
$this->create( $aData , $pmTableUid);
|
||||
$aData['DYN_UID'] = $this->getDynUid();
|
||||
//krumo(BasePeer::getFieldnames('Content'));
|
||||
$fields = array ();
|
||||
@@ -591,9 +602,17 @@ class Dynaform extends BaseDynaform
|
||||
try {
|
||||
$oPro = DynaformPeer::retrieveByPK( $ProUid );
|
||||
if (! is_null( $oPro )) {
|
||||
$title = $oPro->getDynTitle();
|
||||
$type = $oPro->getDynType();
|
||||
$description = $oPro->getDynDescription();
|
||||
|
||||
Content::removeContent( 'DYN_TITLE', '', $oPro->getDynUid() );
|
||||
Content::removeContent( 'DYN_DESCRIPTION', '', $oPro->getDynUid() );
|
||||
$iResult = $oPro->delete();
|
||||
|
||||
//Add Audit Log
|
||||
G::auditLog("DeleteDynaform", "Dynaform Title: ".$title.", Type: ".$type.", Description: ".$description);
|
||||
|
||||
if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' )) {
|
||||
unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' );
|
||||
}
|
||||
|
||||
@@ -116,6 +116,14 @@ try {
|
||||
$_POST['FCD_UID'] = ($_POST['FCD_UID'] == '0') ? '' : $_POST['FCD_UID'];
|
||||
$aData = Array ('FCD_UID' => Isset( $_POST['FCD_UID'] ) ? $_POST['FCD_UID'] : '','FCD_FUNCTION' => $_POST['function'],'FCD_FIELDS' => $_POST['fields_selected'],'FCD_CONDITION' => $_POST['condition'],'FCD_EVENTS' => $_POST['events'],'FCD_EVENT_OWNERS' => $_POST['event_owner_selected'],'FCD_STATUS' => $_POST['enabled'],'FCD_DYN_UID' => $aDYN['DYN_UID']);
|
||||
$oFieldCondition->quickSave( $aData );
|
||||
//Add Audit Log
|
||||
if(isset($_POST['enabled']) && $_POST['enabled'] == 1){
|
||||
$enable = 'enable';
|
||||
}else{
|
||||
$enable = 'disable';
|
||||
}
|
||||
G::auditLog("ConditionsEditorDynaform", "Dynaform Title: " .$aDYN['DYNAFORM_NAME']. ", Condition Editor: [Function: ".$_POST['function']. ", Fields: ".$_POST['fields_selected']. ", Conditions: ".$_POST['condition']. ", Events: ".$_POST['events']. ", Event Owner: ".$_POST['event_owner_selected']. ", Status: ".$enable."]");
|
||||
|
||||
break;
|
||||
case 'delete':
|
||||
require_once 'classes/model/FieldCondition.php';
|
||||
|
||||
@@ -587,7 +587,7 @@ function saveProcess()
|
||||
if ( typeof(winDesigner) == "undefined" || winDesigner.closed ){
|
||||
winDesigner = window.open(
|
||||
"../designer?prj_uid="+resp.result.PRO_UID,
|
||||
'_blank'
|
||||
'winDesigner'
|
||||
);
|
||||
} else {
|
||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||
@@ -648,7 +648,7 @@ editProcess = function(typeParam)
|
||||
if (typeof(winDesigner) == "undefined" || winDesigner.closed){
|
||||
winDesigner = window.open(
|
||||
url,
|
||||
'_blank'
|
||||
'winDesigner'
|
||||
);
|
||||
} else {
|
||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||
@@ -964,7 +964,7 @@ importProcessExistGroup = function()
|
||||
if (typeof(winDesigner) == "undefined" || winDesigner.closed){
|
||||
winDesigner = window.open(
|
||||
"../designer?prj_uid=" + sNewProUid,
|
||||
'_blank'
|
||||
'winDesigner'
|
||||
);
|
||||
} else {
|
||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||
@@ -1110,7 +1110,7 @@ importProcessExistProcess = function()
|
||||
if (typeof(winDesigner) == "undefined" || winDesigner.closed){
|
||||
winDesigner = window.open(
|
||||
"../designer?prj_uid=" + sNewProUid,
|
||||
'_blank'
|
||||
'winDesigner'
|
||||
);
|
||||
} else {
|
||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||
@@ -1248,7 +1248,7 @@ importProcess = function()
|
||||
if (typeof(winDesigner) == "undefined" || winDesigner.closed){
|
||||
winDesigner = window.open(
|
||||
"../designer?prj_uid=" + sNewProUid,
|
||||
'_blank'
|
||||
'winDesigner'
|
||||
);
|
||||
} else {
|
||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||
@@ -1564,3 +1564,7 @@ function enableDisableDebug()
|
||||
|
||||
}
|
||||
|
||||
Ext.EventManager.on(window, 'beforeunload', function () {
|
||||
if (winDesigner)
|
||||
winDesigner.close();
|
||||
});
|
||||
Reference in New Issue
Block a user