@@ -2377,7 +2377,6 @@ class Cases
|
|||||||
|
|
||||||
public function getNextSupervisorStep($sProcessUID, $iPosition, $sType = 'DYNAFORM')
|
public function getNextSupervisorStep($sProcessUID, $iPosition, $sType = 'DYNAFORM')
|
||||||
{
|
{
|
||||||
$iPosition += 1;
|
|
||||||
$oCriteria = new Criteria();
|
$oCriteria = new Criteria();
|
||||||
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
|
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
|
||||||
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, $sType);
|
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, $sType);
|
||||||
@@ -2390,7 +2389,7 @@ class Cases
|
|||||||
$oCriteria = new Criteria();
|
$oCriteria = new Criteria();
|
||||||
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
|
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
|
||||||
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, $sType);
|
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, $sType);
|
||||||
$oCriteria->add(StepSupervisorPeer::STEP_POSITION, 1);
|
$oCriteria->add(StepSupervisorPeer::STEP_POSITION, ($iPosition+1));
|
||||||
$oDataset = StepSupervisorPeer::doSelectRS($oCriteria);
|
$oDataset = StepSupervisorPeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
|
|||||||
@@ -3331,7 +3331,7 @@ class processMap
|
|||||||
public function assignSupervisorStep($sProcessUID, $sObjType, $sObjUID)
|
public function assignSupervisorStep($sProcessUID, $sObjType, $sObjUID)
|
||||||
{
|
{
|
||||||
$oStepSupervisor = new StepSupervisor();
|
$oStepSupervisor = new StepSupervisor();
|
||||||
$oStepSupervisor->create(array('PRO_UID' => $sProcessUID, 'STEP_TYPE_OBJ' => $sObjType, 'STEP_UID_OBJ' => $sObjUID, 'STEP_POSITION' => $oStepSupervisor->getNextPosition($sProcessUID, $sObjType)));
|
$oStepSupervisor->create(array('PRO_UID' => $sProcessUID, 'STEP_TYPE_OBJ' => $sObjType, 'STEP_UID_OBJ' => $sObjUID, 'STEP_POSITION' => $oStepSupervisor->getNextPositionAll($sProcessUID, $sObjType)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -956,9 +956,6 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
$Fields['actionType'] = $_POST['actionType'];
|
$Fields['actionType'] = $_POST['actionType'];
|
||||||
$Fields["docVersion"] = (int)($_POST["docVersion"]);
|
$Fields["docVersion"] = (int)($_POST["docVersion"]);
|
||||||
|
|
||||||
$appDocument = new AppDocument();
|
|
||||||
$arrayAppDocumentData = $appDocument->load($_POST["appDocId"]);
|
|
||||||
|
|
||||||
$oInputDocument = new InputDocument();
|
$oInputDocument = new InputDocument();
|
||||||
$InpDocData = $oInputDocument->load( $Fields['DOC_UID'] );
|
$InpDocData = $oInputDocument->load( $Fields['DOC_UID'] );
|
||||||
|
|
||||||
@@ -971,7 +968,13 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
$Fields["INP_DOC_MAX_FILESIZE_LABEL"] = ($inpDocMaxFilesize > 0)? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
|
$Fields["INP_DOC_MAX_FILESIZE_LABEL"] = ($inpDocMaxFilesize > 0)? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
|
||||||
$Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
|
$Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
|
||||||
|
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?APP_DOC_UID=' . $_POST['appDocId'] . "&DOC_VERSION=" . ($Fields['docVersion'] + 1) . '&APP_UID=' . $arrayAppDocumentData["APP_UID"] . '&UID=' . $_POST['docID']);
|
if($_POST['actionType'] == 'NV'){
|
||||||
|
$appDocument = new AppDocument();
|
||||||
|
$arrayAppDocumentData = $appDocument->load($_POST["appDocId"]);
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?APP_DOC_UID=' . $_POST['appDocId'] . "&DOC_VERSION=" . ($Fields['docVersion'] + 1) . '&APP_UID=' . $arrayAppDocumentData["APP_UID"] . '&UID=' . $_POST['docID']);
|
||||||
|
}else{
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?UID=' . $_POST['docID'] . '&APP_UID=' . $_POST['appDocId'] );
|
||||||
|
}
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case "inputDocumentVersionHistory":
|
case "inputDocumentVersionHistory":
|
||||||
|
|||||||
@@ -1,68 +1,68 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* cases_SaveData.php
|
* cases_SaveData.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
//validate the data post
|
//validate the data post
|
||||||
|
|
||||||
$dynaForm = DynaformPeer::retrieveByPK($_GET["UID"]);
|
$dynaForm = DynaformPeer::retrieveByPK($_GET["UID"]);
|
||||||
|
|
||||||
$flagDynaFormNewVersion = !is_null($dynaForm) && $dynaForm->getDynVersion() == 2;
|
$flagDynaFormNewVersion = !is_null($dynaForm) && $dynaForm->getDynVersion() == 2;
|
||||||
|
|
||||||
if ($flagDynaFormNewVersion) {
|
if ($flagDynaFormNewVersion) {
|
||||||
$dataForm = $_POST["form"];
|
$dataForm = $_POST["form"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$oForm = new Form( $_SESSION['PROCESS'] . '/' . $_GET['UID'], PATH_DYNAFORM );
|
$oForm = new Form( $_SESSION['PROCESS'] . '/' . $_GET['UID'], PATH_DYNAFORM );
|
||||||
$oForm->validatePost();
|
$oForm->validatePost();
|
||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
|
|
||||||
//load the variables
|
//load the variables
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
|
|
||||||
if ($flagDynaFormNewVersion) {
|
if ($flagDynaFormNewVersion) {
|
||||||
$Fields["APP_DATA"] = array_merge($Fields["APP_DATA"], $dataForm);
|
$Fields["APP_DATA"] = array_merge($Fields["APP_DATA"], $dataForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], $_POST['form'] );
|
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], $_POST['form'] );
|
||||||
|
|
||||||
//save data
|
//save data
|
||||||
$aData = array ();
|
$aData = array ();
|
||||||
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
||||||
$aData['APP_PROC_STATUS'] = $Fields['APP_PROC_STATUS'];
|
$aData['APP_PROC_STATUS'] = $Fields['APP_PROC_STATUS'];
|
||||||
$aData['APP_DATA'] = $Fields['APP_DATA'];
|
$aData['APP_DATA'] = $Fields['APP_DATA'];
|
||||||
$aData['DEL_INDEX'] = $_SESSION['INDEX'];
|
$aData['DEL_INDEX'] = $_SESSION['INDEX'];
|
||||||
$aData['TAS_UID'] = $_SESSION['TASK'];
|
$aData['TAS_UID'] = $_SESSION['TASK'];
|
||||||
$aData['CURRENT_DYNAFORM'] = $_GET['UID'];
|
$aData['CURRENT_DYNAFORM'] = $_GET['UID'];
|
||||||
$aData['PRO_UID'] = $Fields['PRO_UID'];
|
$aData['PRO_UID'] = $Fields['PRO_UID'];
|
||||||
$aData['USER_UID'] = $_SESSION['USER_LOGGED'];
|
$aData['USER_UID'] = $_SESSION['USER_LOGGED'];
|
||||||
$aData['APP_STATUS'] = $Fields['APP_STATUS'];
|
$aData['APP_STATUS'] = $Fields['APP_STATUS'];
|
||||||
|
|
||||||
//$aData = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
//$aData = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
$oCase->updateCase( $_SESSION['APPLICATION'], $aData );
|
$oCase->updateCase( $_SESSION['APPLICATION'], $aData );
|
||||||
G::SendTemporalMessage( 'ID_SAVED_SUCCESSFULLY', 'info' );
|
G::SendTemporalMessage( 'ID_SAVED_SUCCESSFULLY', 'info' );
|
||||||
|
|
||||||
//Save files
|
//Save files
|
||||||
if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
|
if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
|
||||||
$arrayField = array ();
|
$arrayField = array ();
|
||||||
@@ -204,10 +204,9 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//go to the next step
|
//go to the next step
|
||||||
$aNextStep = $oCase->getNextSupervisorStep( $_SESSION['PROCESS'], $_SESSION['STEP_POSITION'] );
|
$aNextStep = $oCase->getNextSupervisorStep( $_SESSION['PROCESS'], $_SESSION['STEP_POSITION'] );
|
||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
|
||||||
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
|
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,24 @@ if (! isset( $_GET['type'] )) {
|
|||||||
$_GET['type'] = 'DYNAFORM';
|
$_GET['type'] = 'DYNAFORM';
|
||||||
}
|
}
|
||||||
if (! isset( $_GET['position'] )) {
|
if (! isset( $_GET['position'] )) {
|
||||||
$_GET['position'] = 1;
|
$_GET['position'] = $_SESSION['STEP_POSITION'];
|
||||||
|
}else{
|
||||||
|
if($_GET['type'] == 'DYNAFORM'){
|
||||||
|
$criteria = new Criteria();
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(StepSupervisorPeer::STEP_POSITION);
|
||||||
|
$criteria->add(StepSupervisorPeer::PRO_UID, $_SESSION['PROCESS'], Criteria::EQUAL);
|
||||||
|
$criteria->add(StepSupervisorPeer::STEP_UID_OBJ, $_GET['DYN_UID'], Criteria::EQUAL);
|
||||||
|
|
||||||
|
$rsCriteria = StepSupervisorPeer::doSelectRS($criteria);
|
||||||
|
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
$rsCriteria->next();
|
||||||
|
$aRow = $rsCriteria->getRow();
|
||||||
|
|
||||||
|
$_GET['position'] = $aRow['STEP_POSITION'];
|
||||||
|
}else{
|
||||||
|
$_GET['position'] = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
|
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
|
||||||
|
|||||||
Reference in New Issue
Block a user