Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -89,12 +89,62 @@ if (!defined('PATH_HOME')) {
|
||||
define ('TIME_ZONE', $config['time_zone']);
|
||||
}
|
||||
|
||||
require_once ("classes/model/Configuration.php");
|
||||
require_once ("classes/model/AppCacheView.php");
|
||||
require_once ("classes/model/AppDelegation.php");
|
||||
require_once ("classes/model/Event.php");
|
||||
require_once ("classes/model/AppEvent.php");
|
||||
require_once ("classes/model/CaseScheduler.php");
|
||||
require_once (PATH_GULLIVER . PATH_SEP . 'class.bootstrap.php');
|
||||
//define( 'PATH_GULLIVER_HOME', PATH_TRUNK . 'gulliver' . PATH_SEP );
|
||||
|
||||
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
|
||||
|
||||
Bootstrap::registerClass('BaseConfiguration', PATH_HOME . "engine/classes/model/om/BaseConfiguration.php");
|
||||
Bootstrap::registerClass('Configuration', PATH_HOME . "engine/classes/model/Configuration.php");
|
||||
|
||||
Bootstrap::registerClass('EventPeer', PATH_HOME . "engine/classes/model/EventPeer.php");
|
||||
Bootstrap::registerClass('ApplicationPeer', PATH_HOME . "engine/classes/model/ApplicationPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseGroupUser', PATH_HOME . "engine/classes/model/om/BaseGroupUser.php");
|
||||
Bootstrap::registerClass('BaseUsers', PATH_HOME . "engine/classes/model/om/BaseUsers.php");
|
||||
Bootstrap::registerClass('BaseProcess', PATH_HOME . "engine/classes/model/om/BaseProcess.php");
|
||||
Bootstrap::registerClass('BaseContentPeer', PATH_HOME . "engine/classes/model/om/BaseContentPeer.php");
|
||||
Bootstrap::registerClass('BaseContent', PATH_HOME . "engine/classes/model/om/BaseContent.php");
|
||||
Bootstrap::registerClass('BaseLogCasesScheduler', PATH_HOME . "engine/classes/model/om/BaseLogCasesScheduler.php");
|
||||
Bootstrap::registerClass('BaseApplication', PATH_HOME . "engine/classes/model/om/BaseApplication.php");
|
||||
Bootstrap::registerClass('BaseEvent', PATH_HOME . "engine/classes/model/om/BaseEvent.php");
|
||||
Bootstrap::registerClass('BaseEventPeer', PATH_HOME . "engine/classes/model/om/BaseEventPeer.php");
|
||||
Bootstrap::registerClass('BaseTriggers', PATH_HOME . "engine/classes/model/om/BaseTriggers.php");
|
||||
Bootstrap::registerClass('BaseTriggersPeer', PATH_HOME . "engine/classes/model/om/BaseTriggersPeer.php");
|
||||
Bootstrap::registerClass('BaseAppMessage', PATH_HOME . "engine/classes/model/om/BaseAppMessage.php");
|
||||
Bootstrap::registerClass('BaseAppMessagePeer', PATH_HOME . "engine/classes/model/om/BaseAppMessagePeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseAppDelegation', PATH_HOME . "engine/classes/model/om/BaseAppDelegation.php");
|
||||
Bootstrap::registerClass('BaseHoliday', PATH_HOME . "engine/classes/model/om/BaseHoliday.php");
|
||||
Bootstrap::registerClass('BaseHolidayPeer', PATH_HOME . "engine/classes/model/om/BaseHolidayPeer.php");
|
||||
Bootstrap::registerClass('BaseTask', PATH_HOME . "engine/classes/model/om/BaseTask.php");
|
||||
Bootstrap::registerClass('BaseTaskPeer', PATH_HOME . "engine/classes/model/om/BaseTaskPeer.php");
|
||||
Bootstrap::registerClass('HolidayPeer', PATH_HOME . "engine/classes/model/HolidayPeer.php");
|
||||
Bootstrap::registerClass('Holiday', PATH_HOME . "engine/classes/model/Holiday.php");
|
||||
|
||||
Bootstrap::registerClass('Task', PATH_HOME . "engine/classes/model/Task.php");
|
||||
Bootstrap::registerClass('TaskPeer', PATH_HOME . "engine/classes/model/TaskPeer.php");
|
||||
Bootstrap::registerClass('dates', PATH_HOME . "engine/classes/class.dates.php");
|
||||
Bootstrap::registerClass('AppDelegation', PATH_HOME . "engine/classes/model/AppDelegation.php");
|
||||
Bootstrap::registerClass('AppDelegationPeer', PATH_HOME . "engine/classes/model/AppDelegationPeer.php");
|
||||
Bootstrap::registerClass('BaseAppDelay', PATH_HOME . "engine/classes/model/om/BaseAppDelay.php");
|
||||
Bootstrap::registerClass('AppDelayPeer', PATH_HOME . "engine/classes/model/AppDelayPeer.php");
|
||||
Bootstrap::registerClass('AppDelay', PATH_HOME . "engine/classes/model/AppDelay.php");
|
||||
Bootstrap::registerClass('BaseAdditionalTables',PATH_HOME . "engine/classes/model/om/BaseAdditionalTables.php");
|
||||
Bootstrap::registerClass('AdditionalTables', PATH_HOME . "engine/classes/model/AdditionalTables.php");
|
||||
Bootstrap::registerClass('BaseAppCacheView', PATH_HOME . "engine/classes/model/om/BaseAppCacheView.php");
|
||||
Bootstrap::registerClass('AppCacheView', PATH_HOME . "engine/classes/model/AppCacheView.php");
|
||||
Bootstrap::registerClass('AppCacheViewPeer', PATH_HOME . "engine/classes/model/AppCacheViewPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseEvent', PATH_HOME . "engine/classes/model/om/BaseEvent.php");
|
||||
Bootstrap::registerClass('Event', PATH_HOME . "engine/classes/model/Event.php");
|
||||
|
||||
Bootstrap::registerClass('BaseAppEvent', PATH_HOME . "engine/classes/model/om/BaseAppEvent.php");
|
||||
Bootstrap::registerClass('AppEvent', PATH_HOME . "engine/classes/model/AppEvent.php");
|
||||
Bootstrap::registerClass('AppEventPeer', PATH_HOME . "engine/classes/model/AppEventPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseCaseScheduler', PATH_HOME . "engine/classes/model/om/BaseCaseScheduler.php");
|
||||
Bootstrap::registerClass('CaseScheduler', PATH_HOME . "engine/classes/model/CaseScheduler.php");
|
||||
|
||||
G::LoadClass("case");
|
||||
G::LoadClass("dates");
|
||||
|
||||
@@ -135,6 +135,12 @@
|
||||
"mini": "gulliver/js/maborak/core/module.dom.js",
|
||||
"minify": true
|
||||
},
|
||||
{
|
||||
"name": "module.abbr",
|
||||
"full": "gulliver/js/maborak/core/module.abbr.js",
|
||||
"mini": "gulliver/js/maborak/core/module.abbr.js",
|
||||
"minify": true
|
||||
},
|
||||
{
|
||||
"name": "module.dashboard",
|
||||
"full": "gulliver/js/maborak/core/module.dashboard.js",
|
||||
|
||||
@@ -3467,6 +3467,201 @@ class Cases
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a input document
|
||||
*
|
||||
* Return the application document ID
|
||||
*
|
||||
* @param string $inputDocumentUid Input document ID
|
||||
* @param string $appDocUid Application document ID
|
||||
* @param int $docVersion Document version
|
||||
* @param string $appDocType Document type
|
||||
* @param string $appDocComment Document comment
|
||||
* @param string $inputDocumentAction Action, posible values: null or empty (Add), "R" (Replace), "NV" (New Version)
|
||||
* @param string $applicationUid Application ID
|
||||
* @param int $delIndex Delegation index
|
||||
* @param string $taskUid Task ID
|
||||
* @param string $userUid User ID
|
||||
* @param string $option Option, posible values: "xmlform", "file"
|
||||
* @param string $file File ($_FILES["form"]["name"]["APP_DOC_FILENAME"] or path to file)
|
||||
* @param int $fileError File error ($_FILES["form"]["error"]["APP_DOC_FILENAME"] or 0)
|
||||
* @param string $fileTmpName File temporal name ($_FILES["form"]["tmp_name"]["APP_DOC_FILENAME"] or null)
|
||||
* @return string Return application document ID
|
||||
*/
|
||||
public function addInputDocument(
|
||||
$inputDocumentUid,
|
||||
$appDocUid,
|
||||
$docVersion,
|
||||
$appDocType,
|
||||
$appDocComment,
|
||||
$inputDocumentAction,
|
||||
$applicationUid,
|
||||
$delIndex,
|
||||
$taskUid,
|
||||
$userUid,
|
||||
$option,
|
||||
$file,
|
||||
$fileError = 0,
|
||||
$fileTmpName = null
|
||||
) {
|
||||
$appDocFileName = null;
|
||||
$sw = 0;
|
||||
|
||||
switch ($option) {
|
||||
case "xmlform":
|
||||
$appDocFileName = $file;
|
||||
|
||||
if ($fileError == 0) {
|
||||
$sw = 1;
|
||||
}
|
||||
break;
|
||||
case "file":
|
||||
$appDocFileName = basename($file);
|
||||
|
||||
if (file_exists($file) && is_file($file)) {
|
||||
$sw = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ($sw == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//Info
|
||||
$inputDocument = new InputDocument();
|
||||
$arrayInputDocumentData = $inputDocument->load($inputDocumentUid);
|
||||
|
||||
//Get the Custom Folder ID (create if necessary)
|
||||
$appFolder = new AppFolder();
|
||||
$folderId = $appFolder->createFromPath($arrayInputDocumentData["INP_DOC_DESTINATION_PATH"], $applicationUid);
|
||||
|
||||
$tags = $appFolder->parseTags($arrayInputDocumentData["INP_DOC_TAGS"], $applicationUid);
|
||||
|
||||
$appDocument = new AppDocument();
|
||||
$arrayField = array();
|
||||
|
||||
switch ($inputDocumentAction) {
|
||||
case "R":
|
||||
//Replace
|
||||
$arrayField = array(
|
||||
"APP_DOC_UID" => $appDocUid,
|
||||
"APP_UID" => $applicationUid,
|
||||
"DOC_VERSION" => $docVersion,
|
||||
"DEL_INDEX" => $delIndex,
|
||||
"USR_UID" => $userUid,
|
||||
"DOC_UID" => $inputDocumentUid,
|
||||
"APP_DOC_TYPE" => $appDocType,
|
||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
||||
"APP_DOC_COMMENT" => $appDocComment,
|
||||
"APP_DOC_TITLE" => "",
|
||||
"APP_DOC_FILENAME" => $appDocFileName,
|
||||
"FOLDER_UID" => $folderId,
|
||||
"APP_DOC_TAGS" => $tags
|
||||
);
|
||||
|
||||
$appDocument->update($arrayField);
|
||||
break;
|
||||
case "NV":
|
||||
//New Version
|
||||
$arrayField = array(
|
||||
"APP_DOC_UID" => $appDocUid,
|
||||
"APP_UID" => $applicationUid,
|
||||
"DEL_INDEX" => $delIndex,
|
||||
"USR_UID" => $userUid,
|
||||
"DOC_UID" => $inputDocumentUid,
|
||||
"APP_DOC_TYPE" => $appDocType,
|
||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
||||
"APP_DOC_COMMENT" => $appDocComment,
|
||||
"APP_DOC_TITLE" => "",
|
||||
"APP_DOC_FILENAME" => $appDocFileName,
|
||||
"FOLDER_UID" => $folderId,
|
||||
"APP_DOC_TAGS" => $tags
|
||||
);
|
||||
|
||||
$appDocument->create($arrayField);
|
||||
break;
|
||||
default:
|
||||
//New
|
||||
$arrayField = array(
|
||||
"APP_UID" => $applicationUid,
|
||||
"DEL_INDEX" => $delIndex,
|
||||
"USR_UID" => $userUid,
|
||||
"DOC_UID" => $inputDocumentUid,
|
||||
"APP_DOC_TYPE" => $appDocType,
|
||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
||||
"APP_DOC_COMMENT" => $appDocComment,
|
||||
"APP_DOC_TITLE" => "",
|
||||
"APP_DOC_FILENAME" => $appDocFileName,
|
||||
"FOLDER_UID" => $folderId,
|
||||
"APP_DOC_TAGS" => $tags
|
||||
);
|
||||
|
||||
$appDocument->create($arrayField);
|
||||
break;
|
||||
}
|
||||
|
||||
//Save the file
|
||||
$appDocUid = $appDocument->getAppDocUid();
|
||||
$docVersion = $appDocument->getDocVersion();
|
||||
$arrayInfo = pathinfo($appDocument->getAppDocFilename());
|
||||
$extension = (isset($arrayInfo["extension"]))? $arrayInfo["extension"] : null;
|
||||
$strPathName = PATH_DOCUMENT . $applicationUid . PATH_SEP;
|
||||
$strFileName = $appDocUid . "_" . $docVersion . "." . $extension;
|
||||
|
||||
switch ($option) {
|
||||
case "xmlform":
|
||||
G::uploadFile($fileTmpName, $strPathName, $strFileName);
|
||||
break;
|
||||
case "file":
|
||||
$umaskOld = umask(0);
|
||||
|
||||
if (!is_dir($strPathName)) {
|
||||
G::verifyPath($strPathName, true);
|
||||
}
|
||||
|
||||
copy($file, $strPathName . $strFileName);
|
||||
chmod($strPathName . $strFileName, 0666);
|
||||
umask($umaskOld);
|
||||
break;
|
||||
}
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
if ($pluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists("uploadDocumentData")) {
|
||||
$triggerDetail = $pluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
|
||||
$documentData = new uploadDocumentData(
|
||||
$applicationUid,
|
||||
$userUid,
|
||||
$strPathName . $strFileName,
|
||||
$arrayField["APP_DOC_FILENAME"],
|
||||
$appDocUid,
|
||||
$docVersion
|
||||
);
|
||||
$uploadReturn = $pluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData);
|
||||
|
||||
if ($uploadReturn) {
|
||||
$arrayField["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
|
||||
|
||||
if (!isset($arrayField["APP_DOC_UID"])) {
|
||||
$arrayField["APP_DOC_UID"] = $appDocUid;
|
||||
}
|
||||
|
||||
if (!isset($arrayField["DOC_VERSION"])) {
|
||||
$arrayField["DOC_VERSION"] = $docVersion;
|
||||
}
|
||||
|
||||
$appDocument->update($arrayField);
|
||||
|
||||
unlink($strPathName . $strFileName);
|
||||
}
|
||||
}
|
||||
//End plugin
|
||||
|
||||
return $appDocUid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the input documents list to Review
|
||||
*
|
||||
@@ -4717,10 +4912,10 @@ class Cases
|
||||
|
||||
if ($sTo != null) {
|
||||
$oSpool = new spoolRun();
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
|
||||
$oSpool->setConfig(array(
|
||||
|
||||
@@ -219,6 +219,7 @@ class dynaformEditor extends WebResource
|
||||
//for showHide tab option @Neyek
|
||||
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_CONDITIONS_EDITOR"), $sName . '[9]', 'dynaformEditor.changeToShowHide', 'dynaformEditor.saveShowHide');
|
||||
$G_PUBLISH->AddContent('panel-close');
|
||||
$oHeadPublisher->addScriptFile("/js/maborak/core/maborak.loader.js",2);
|
||||
$oHeadPublisher->addScriptFile('/jscore/dynaformEditor/core/dynaformEditor.js');
|
||||
//$oHeadPublisher->addScriptFile('/js/dveditor/core/dveditor.js');
|
||||
//$oHeadPublisher->addScriptFile('/codepress/codepress.js',1);
|
||||
|
||||
@@ -786,12 +786,25 @@ function getEmailConfiguration ()
|
||||
* @param string(32) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email.
|
||||
* @param array | $aFields | An optional associative array | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
|
||||
* @param array | $aAttachment | Attachment | An Optional arrray. An array of files (full paths) to be attached to the email.
|
||||
* @param boolean | $showMessage = true | Show message | Optional parameter.
|
||||
* @param int | $delIndex = 0 | Delegation index of the case | Optional parameter. The delegation index of the current task in the case.
|
||||
* @return int | $result | result | Result of sending email
|
||||
*
|
||||
*/
|
||||
//@param array | $aFields=array() | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value.
|
||||
function PMFSendMessage ($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields = array(), $aAttachment = array(), $showMessage = true)
|
||||
{
|
||||
function PMFSendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$aFields = array(),
|
||||
$aAttachment = array(),
|
||||
$showMessage = true,
|
||||
$delIndex = 0
|
||||
) {
|
||||
global $oPMScript;
|
||||
|
||||
if (isset( $oPMScript->aFields ) && is_array( $oPMScript->aFields )) {
|
||||
@@ -802,9 +815,22 @@ function PMFSendMessage ($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTempla
|
||||
}
|
||||
}
|
||||
|
||||
G::LoadClass( 'wsBase' );
|
||||
G::LoadClass("wsBase");
|
||||
|
||||
$ws = new wsBase();
|
||||
$result = $ws->sendMessage( $caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields, $aAttachment, $showMessage);
|
||||
$result = $ws->sendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$aFields,
|
||||
$aAttachment,
|
||||
$showMessage,
|
||||
$delIndex
|
||||
);
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
return 1;
|
||||
@@ -1420,6 +1446,65 @@ function PMFUserList () //its test was successfull
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method
|
||||
*
|
||||
* Add a input document.
|
||||
*
|
||||
* @name PMFAddInputDocument
|
||||
* @label PMF Add a input document.
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddInputDocument.28.29
|
||||
*
|
||||
* @param string(32) | $inputDocumentUid | ID of the input document | The unique ID of the input document.
|
||||
* @param string(32) | $appDocUid | ID of the application document | The unique ID of the application document; if action is set to null or empty (Add), then this parameter it set to null or empty.
|
||||
* @param int | $docVersion | Document version | Document version.
|
||||
* @param string | $appDocType = "INPUT" | Document type | Document type.
|
||||
* @param string | $appDocComment | Document comment | Document comment.
|
||||
* @param string | $inputDocumentAction | Action | Action, posible values: null or empty (Add), "R" (Replace), "NV" (New Version).
|
||||
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
|
||||
* @param int | $delIndex | Delegation index of the case | The delegation index of the current task in the case.
|
||||
* @param string(32) | $taskUid | ID of the task | The unique ID of the task.
|
||||
* @param string(32) | $userUid | ID user | The unique ID of the user who will add a input document.
|
||||
* @param string | $option = "file" | Option | Option, value: "file".
|
||||
* @param string | $file = "path_to_file/myfile.txt" | File, path to file | File, path to file.
|
||||
* @return string | $appDocUid | ID of the application document | Returns ID if it has added the input document successfully; otherwise, returns null or empty if an error occurred.
|
||||
*
|
||||
*/
|
||||
function PMFAddInputDocument(
|
||||
$inputDocumentUid,
|
||||
$appDocUid,
|
||||
$docVersion,
|
||||
$appDocType = "INPUT",
|
||||
$appDocComment,
|
||||
$inputDocumentAction,
|
||||
$caseUid,
|
||||
$delIndex,
|
||||
$taskUid,
|
||||
$userUid,
|
||||
$option = "file",
|
||||
$file = "path_to_file/myfile.txt"
|
||||
) {
|
||||
G::LoadClass("case");
|
||||
$case = new Cases();
|
||||
|
||||
$appDocUid = $case->addInputDocument(
|
||||
$inputDocumentUid,
|
||||
$appDocUid,
|
||||
$docVersion,
|
||||
$appDocType,
|
||||
$appDocComment,
|
||||
$inputDocumentAction,
|
||||
$caseUid,
|
||||
$delIndex,
|
||||
$taskUid,
|
||||
$userUid,
|
||||
$option,
|
||||
$file
|
||||
);
|
||||
|
||||
return $appDocUid;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Generates an Output Document
|
||||
@@ -2339,10 +2424,13 @@ function PMFGetCaseNotes ($applicationID, $type = 'array', $userUid = '')
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Delete a specified case.
|
||||
* @method
|
||||
*
|
||||
* Delete a specified case.
|
||||
*
|
||||
* @name PMFDeleteCase
|
||||
* @label PMF Delete a specified case.
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFDeleteCase.28.29
|
||||
*
|
||||
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
|
||||
* @return int | $result | Result of the elimination | Returns 1 if the case is delete successfully; otherwise, returns 0 if an error occurred.
|
||||
@@ -2364,10 +2452,13 @@ function PMFDeleteCase ($caseUid)
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Cancel a specified case.
|
||||
* @method
|
||||
*
|
||||
* Cancel a specified case.
|
||||
*
|
||||
* @name PMFCancelCase
|
||||
* @label PMF Cancel a specified case.
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFCancelCase.28.29
|
||||
*
|
||||
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
|
||||
* @param int | $delIndex | Delegation index of the case | The delegation index of the current task in the case.
|
||||
@@ -2401,10 +2492,13 @@ function PMFCancelCase ($caseUid, $delIndex, $userUid)
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Pauses a specified case.
|
||||
* @method
|
||||
*
|
||||
* Pauses a specified case.
|
||||
*
|
||||
* @name PMFPauseCase
|
||||
* @label PMF Pauses a specified case.
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFPauseCase.28.29
|
||||
*
|
||||
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
|
||||
* @param int | $delIndex | Delegation index of the case | The delegation index of the current task in the case.
|
||||
@@ -2439,10 +2533,13 @@ function PMFPauseCase ($caseUid, $delIndex, $userUid, $unpauseDate = null)
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Unpause a specified case.
|
||||
* @method
|
||||
*
|
||||
* Unpause a specified case.
|
||||
*
|
||||
* @name PMFUnpauseCase
|
||||
* @label PMF Unpause a specified case.
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFUnpauseCase.28.29
|
||||
*
|
||||
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
|
||||
* @param int | $delIndex | Delegation index of the case | The delegation index of the current task in the case.
|
||||
@@ -2466,10 +2563,13 @@ function PMFUnpauseCase ($caseUid, $delIndex, $userUid)
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Add case note.
|
||||
* @method
|
||||
*
|
||||
* Add case note.
|
||||
*
|
||||
* @name PMFAddCaseNote
|
||||
* @label PMF Add case note
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddCaseNote.28.29
|
||||
*
|
||||
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
|
||||
* @param string(32) | $processUid | ID of the process | The unique ID of the process.
|
||||
|
||||
@@ -28,41 +28,41 @@
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*/
|
||||
G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
G::LoadClass( 'groups' );
|
||||
G::LoadClass( 'tasks' );
|
||||
//G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
//G::LoadClass( 'groups' );
|
||||
//G::LoadClass( 'tasks' );
|
||||
G::LoadClass( 'xmlfield_InputPM' );
|
||||
G::LoadClass( 'calendar' );
|
||||
//G::LoadClass( 'calendar' );
|
||||
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
require_once 'classes/model/CaseTracker.php';
|
||||
require_once 'classes/model/CaseTrackerObject.php';
|
||||
require_once 'classes/model/Configuration.php';
|
||||
require_once 'classes/model/Content.php';
|
||||
require_once 'classes/model/DbSource.php';
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
require_once 'classes/model/Event.php';
|
||||
require_once 'classes/model/Groupwf.php';
|
||||
require_once 'classes/model/InputDocument.php';
|
||||
require_once 'classes/model/ObjectPermission.php';
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/ProcessUser.php';
|
||||
require_once 'classes/model/ReportTable.php';
|
||||
require_once 'classes/model/Route.php';
|
||||
require_once 'classes/model/CaseScheduler.php';
|
||||
require_once 'classes/model/LogCasesScheduler.php';
|
||||
require_once 'classes/model/Step.php';
|
||||
require_once 'classes/model/StepSupervisor.php';
|
||||
require_once 'classes/model/StepTrigger.php';
|
||||
require_once 'classes/model/SubProcess.php';
|
||||
require_once 'classes/model/SwimlanesElements.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
require_once 'classes/model/TaskUser.php';
|
||||
require_once 'classes/model/Triggers.php';
|
||||
require_once 'classes/model/Users.php';
|
||||
require_once 'classes/model/Gateway.php';
|
||||
require_once 'classes/model/om/BaseUsers.php';
|
||||
//require_once 'classes/model/AppDelegation.php';
|
||||
//require_once 'classes/model/CaseTracker.php';
|
||||
//require_once 'classes/model/CaseTrackerObject.php';
|
||||
//require_once 'classes/model/Configuration.php';
|
||||
//require_once 'classes/model/Content.php';
|
||||
//require_once 'classes/model/DbSource.php';
|
||||
//require_once 'classes/model/Dynaform.php';
|
||||
//require_once 'classes/model/Event.php';
|
||||
//require_once 'classes/model/Groupwf.php';
|
||||
//require_once 'classes/model/InputDocument.php';
|
||||
//require_once 'classes/model/ObjectPermission.php';
|
||||
//require_once 'classes/model/OutputDocument.php';
|
||||
//require_once 'classes/model/Process.php';
|
||||
//require_once 'classes/model/ProcessUser.php';
|
||||
//require_once 'classes/model/ReportTable.php';
|
||||
//require_once 'classes/model/Route.php';
|
||||
//require_once 'classes/model/CaseScheduler.php';
|
||||
//require_once 'classes/model/LogCasesScheduler.php';
|
||||
//require_once 'classes/model/Step.php';
|
||||
//require_once 'classes/model/StepSupervisor.php';
|
||||
//require_once 'classes/model/StepTrigger.php';
|
||||
//require_once 'classes/model/SubProcess.php';
|
||||
//require_once 'classes/model/SwimlanesElements.php';
|
||||
//require_once 'classes/model/Task.php';
|
||||
//require_once 'classes/model/TaskUser.php';
|
||||
//require_once 'classes/model/Triggers.php';
|
||||
//require_once 'classes/model/Users.php';
|
||||
//require_once 'classes/model/Gateway.php';
|
||||
//require_once 'classes/model/om/BaseUsers.php';
|
||||
|
||||
/**
|
||||
* processMap - Process Map class
|
||||
@@ -418,8 +418,8 @@ class processMap
|
||||
$oPM->taskOptions[] = $taskOption;
|
||||
}
|
||||
|
||||
$oJSON = new Services_JSON();
|
||||
return $oJSON->encode( $oPM );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($oPM);//$oJSON->encode( $oPM );
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
@@ -1426,9 +1426,8 @@ class processMap
|
||||
$oNewTask->statusIcons = array ();
|
||||
$oNewTask->statusIcons[] = array ('label' => '','icon' => '/images/alert.gif','message' => '','url' => ''
|
||||
);
|
||||
$oJSON = new Services_JSON();
|
||||
|
||||
return $oJSON->encode( $oNewTask );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($oNewTask);//$oJSON->encode( $oNewTask );
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
@@ -1669,8 +1668,8 @@ class processMap
|
||||
$oGateway->update( $aData );
|
||||
}
|
||||
$oEncode->uid = $sGat_uid;
|
||||
$oJSON = new Services_JSON();
|
||||
return $oJSON->encode( $oEncode );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($oEncode);//$oJSON->encode( $oEncode );
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
@@ -1700,8 +1699,8 @@ class processMap
|
||||
) );
|
||||
break;
|
||||
}
|
||||
$oJSON = new Services_JSON();
|
||||
return $oJSON->encode( $oNewGuide );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($oNewGuide);//$oJSON->encode( $oNewGuide );
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
@@ -1791,8 +1790,8 @@ class processMap
|
||||
$oSL = new SwimlanesElements();
|
||||
$oNewText->uid = $oSL->create( array ('PRO_UID' => $sProcessUID,'SWI_TYPE' => 'TEXT','SWI_TEXT' => $sLabel,'SWI_X' => $iX,'SWI_Y' => $iY,'SWI_NEXT_UID' => $sNext_uid
|
||||
) );
|
||||
$oJSON = new Services_JSON();
|
||||
return $oJSON->encode( $oNewText );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($oNewText);//$oJSON->encode( $oNewText );
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
@@ -4660,14 +4659,14 @@ class processMap
|
||||
$oNewTask->label = 'Sub-Process'; //G::LoadTranslation('ID_TASK');
|
||||
$oNewTask->uid = $oTask->create( array ('PRO_UID' => $sProcessUID,'TAS_TITLE' => $oNewTask->label,'TAS_POSX' => $iX,'TAS_POSY' => $iY,'TAS_TYPE' => 'SUBPROCESS'
|
||||
) );
|
||||
$oJSON = new Services_JSON();
|
||||
//$oJSON = new Services_JSON();
|
||||
|
||||
$oOP = new SubProcess();
|
||||
$aData = array ('SP_UID' => G::generateUniqueID(),'PRO_UID' => 0,'TAS_UID' => 0,'PRO_PARENT' => $sProcessUID,'TAS_PARENT' => $oNewTask->uid,'SP_TYPE' => 'SIMPLE','SP_SYNCHRONOUS' => 0,'SP_SYNCHRONOUS_TYPE' => 'ALL','SP_SYNCHRONOUS_WAIT' => 0,'SP_VARIABLES_OUT' => '','SP_VARIABLES_IN' => '','SP_GRID_IN' => ''
|
||||
);
|
||||
$oOP->create( $aData );
|
||||
|
||||
return $oJSON->encode( $oNewTask );
|
||||
return Bootstrap::json_endoce($oNewTask);//$oJSON->encode( $oNewTask );
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
@@ -5081,8 +5080,8 @@ class processMap
|
||||
);
|
||||
$oDataset->next();
|
||||
}
|
||||
$oJSON = new Services_JSON();
|
||||
return $oJSON->encode( $aProcesses );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($aProcesses);//$oJSON->encode( $aProcesses );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7396,8 +7395,8 @@ class processMap
|
||||
$oEvent->update( $aData );
|
||||
}
|
||||
$oEncode->uid = $sEvn_uid;
|
||||
$oJSON = new Services_JSON();
|
||||
return $oJSON->encode( $oEncode );
|
||||
//$oJSON = new Services_JSON();
|
||||
return Bootstrap::json_encode($oEncode);//$oJSON->encode( $oEncode );
|
||||
}
|
||||
|
||||
public function saveExtEvents ($oData)
|
||||
|
||||
@@ -338,8 +338,13 @@ class propelTable
|
||||
$this->tpl->newBlock( "headers" );
|
||||
$sortOrder = (((isset( $this->aOrder[$this->fields[$r]['Name']] )) && ($this->aOrder[$this->fields[$r]['Name']] === 'ASC')) ? 'DESC' : 'ASC');
|
||||
$sortOrder = (((isset( $this->aOrder[$this->fields[$r]['Name']] )) && ($this->aOrder[$this->fields[$r]['Name']] === 'DESC')) ? '' : $sortOrder);
|
||||
$this->style[$r]['href'] = $this->ownerPage . '?order=' . ($sortOrder !== '' ? (G::createUID( '', $this->fields[$r]['Name'] ) . '=' . $sortOrder) : '') . '&page=' . $this->currentPage;
|
||||
$this->style[$r]['onsort'] = $this->id . '.doSort("' . G::createUID( '', $this->fields[$r]['Name'] ) . '" , "' . $sortOrder . '");return false;';
|
||||
if ($this->style[$r]['titleVisibility'] != '0') {
|
||||
$this->style[$r]['href'] = $this->ownerPage . '?order=' . ($sortOrder !== '' ? (G::createUID( '', $this->fields[$r]['Name'] ) . '=' . $sortOrder) : '') . '&page=' . $this->currentPage;
|
||||
$this->style[$r]['onsort'] = $this->id . '.doSort("' . G::createUID( '', $this->fields[$r]['Name'] ) . '" , "' . $sortOrder . '");return false;';
|
||||
} else {
|
||||
$this->style[$r]['href'] = '#';
|
||||
$this->style[$r]['onsort'] = 'return false;';
|
||||
}
|
||||
if (isset( $this->style[$r]['href'] )) {
|
||||
$this->tpl->assign( "href", $this->style[$r]['href'] );
|
||||
}
|
||||
@@ -492,7 +497,7 @@ class propelTable
|
||||
}
|
||||
}
|
||||
//Hidden titles
|
||||
if (! (strpos( ' linknew button endgrid2 ', ' ' . $this->fields[$r]['Type'] . ' ' ) === false)) {
|
||||
if (! (strpos( ' linknew button link endgrid2 ', ' ' . $this->fields[$r]['Type'] . ' ' ) === false)) {
|
||||
$this->style[$r]['titleVisibility'] = '0';
|
||||
}
|
||||
//Align titles
|
||||
|
||||
@@ -729,10 +729,24 @@ class wsBase
|
||||
* @param string $sSubject
|
||||
* @param string $sTemplate
|
||||
* @param $appFields = null
|
||||
* @param $aAttachment = null
|
||||
* @param boolean $showMessage = true
|
||||
* @param int $delIndex = 0
|
||||
* @return $result will return an object
|
||||
*/
|
||||
public function sendMessage ($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $aAttachment = null, $showMessage = true)
|
||||
{
|
||||
public function sendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$appFields = null,
|
||||
$aAttachment = null,
|
||||
$showMessage = true,
|
||||
$delIndex = 0
|
||||
) {
|
||||
try {
|
||||
G::loadClass( 'system' );
|
||||
|
||||
@@ -789,7 +803,21 @@ class wsBase
|
||||
}
|
||||
$showMessage = ($showMessage) ? 1 : 0 ;
|
||||
|
||||
$messageArray = array ('msg_uid' => '','app_uid' => $caseId,'del_index' => 0,'app_msg_type' => 'TRIGGER','app_msg_subject' => $sSubject,'app_msg_from' => $sFrom,'app_msg_to' => $sTo,'app_msg_body' => $sBody,'app_msg_cc' => $sCc,'app_msg_bcc' => $sBcc,'app_msg_attach' => $aAttachment,'app_msg_template' => '','app_msg_status' => 'pending', 'app_msg_show_message' => $showMessage
|
||||
$messageArray = array(
|
||||
"msg_uid" => "",
|
||||
"app_uid" => $caseId,
|
||||
"del_index" => $delIndex,
|
||||
"app_msg_type" => "TRIGGER",
|
||||
"app_msg_subject" => $sSubject,
|
||||
"app_msg_from" => $sFrom,
|
||||
"app_msg_to" => $sTo,
|
||||
"app_msg_body" => $sBody,
|
||||
"app_msg_cc" => $sCc,
|
||||
"app_msg_bcc" => $sBcc,
|
||||
"app_msg_attach" => $aAttachment,
|
||||
"app_msg_template" => "",
|
||||
"app_msg_status" => "pending",
|
||||
"app_msg_show_message" => $showMessage
|
||||
);
|
||||
|
||||
$oSpool->create( $messageArray );
|
||||
|
||||
@@ -387,10 +387,10 @@ function getDynaformsVars ($sProcessUID, $bSystemVars = true, $bIncMulSelFields
|
||||
$aFields[] = array ('sName' => 'PIN','sType' => 'system','sLabel' => 'System variable'
|
||||
);
|
||||
}
|
||||
$aInvalidTypes = array ('title','subtitle','link','file','button','reset','submit','javascript'
|
||||
);
|
||||
$aMultipleSelectionFields = array ('listbox','checkgroup','grid'
|
||||
);
|
||||
|
||||
$aInvalidTypes = array("title", "subtitle", "file", "button", "reset", "submit", "javascript");
|
||||
$aMultipleSelectionFields = array("listbox", "checkgroup", "grid");
|
||||
|
||||
if ($bIncMulSelFields != 0) {
|
||||
$aInvalidTypes = array_merge( $aInvalidTypes, $aMultipleSelectionFields );
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
|
||||
require_once 'classes/model/om/BaseAppFolder.php';
|
||||
require_once 'classes/model/Application.php';
|
||||
//require_once 'classes/model/om/BaseAppFolder.php';
|
||||
//require_once 'classes/model/Application.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'APP_FOLDER' table.
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
|
||||
require_once 'classes/model/om/BaseCaseScheduler.php';
|
||||
//require_once 'classes/model/om/BaseCaseScheduler.php';
|
||||
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
//require_once 'classes/model/Process.php';
|
||||
//require_once 'classes/model/Task.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'CASE_SCHEDULER' table.
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
*/
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseContentPeer.php';
|
||||
//require_once 'classes/model/om/BaseContentPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/Content.php';
|
||||
//include_once 'classes/model/Content.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
|
||||
require_once 'classes/model/Content.php';
|
||||
require_once 'classes/model/om/BaseEvent.php';
|
||||
//require_once 'classes/model/Content.php';
|
||||
//require_once 'classes/model/om/BaseEvent.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'EVENT' table.
|
||||
@@ -18,9 +18,9 @@ require_once 'classes/model/om/BaseEvent.php';
|
||||
* long as it does not already exist in the output directory.
|
||||
*/
|
||||
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
require_once 'classes/model/AppEvent.php';
|
||||
require_once 'classes/model/Triggers.php';
|
||||
//require_once 'classes/model/AppDelegation.php';
|
||||
//require_once 'classes/model/AppEvent.php';
|
||||
//require_once 'classes/model/Triggers.php';
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
|
||||
require_once 'classes/model/om/BaseGateway.php';
|
||||
//require_once 'classes/model/om/BaseGateway.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'GATEWAY' table.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
|
||||
require_once 'classes/model/om/BaseLogCasesScheduler.php';
|
||||
//require_once 'classes/model/om/BaseLogCasesScheduler.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
*/
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseStepSupervisorPeer.php';
|
||||
//require_once 'classes/model/om/BaseStepSupervisorPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/StepSupervisor.php';
|
||||
//include_once 'classes/model/StepSupervisor.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
|
||||
require_once 'classes/model/om/BaseSubProcess.php';
|
||||
//require_once 'classes/model/om/BaseSubProcess.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'SUB_PROCESS' table.
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once 'classes/model/om/BaseSwimlanesElements.php';
|
||||
require_once 'classes/model/Content.php';
|
||||
//require_once 'classes/model/om/BaseSwimlanesElements.php';
|
||||
//require_once 'classes/model/Content.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'SWIMLANES_ELEMENTS' table.
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
*/
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseSwimlanesElementsPeer.php';
|
||||
//require_once 'classes/model/om/BaseSwimlanesElementsPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/SwimlanesElements.php';
|
||||
//include_once 'classes/model/SwimlanesElements.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
*/
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseTriggersPeer.php';
|
||||
//require_once 'classes/model/om/BaseTriggersPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/Triggers.php';
|
||||
//include_once 'classes/model/Triggers.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -264,6 +264,50 @@ var dynaformEditor={
|
||||
url='dynaforms_Saveas';
|
||||
popupWindow('Save as', url+'?DYN_UID='+this.dynUid+'&AA='+this.A , 500, 350);
|
||||
},
|
||||
importForm:function(){
|
||||
panelImportDyna = new leimnud.module.panel();
|
||||
panelImportDyna.options={
|
||||
limit : true,
|
||||
size : {w:410,h:160},
|
||||
position : {x:0,y:0,center:true},
|
||||
title : '',
|
||||
theme : 'processmaker',
|
||||
statusBar: false,
|
||||
control : {drag:false,resize:true,close:false},
|
||||
fx : {opacity:true,rolled:false,modal:true}
|
||||
};
|
||||
panelImportDyna.setStyle = {modal: {
|
||||
backgroundColor: 'white'
|
||||
}};
|
||||
panelImportDyna.make();
|
||||
panelImportDyna.addContent('<div id="importAjax" align="center"><img src="/images/ext/default/grid/loading.gif" /></div>');
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../dynaforms/fieldsHandlerAjax',
|
||||
async : false,
|
||||
method: 'POST',
|
||||
args : 'request=showImportForm' + '&DYN_UID=' + this.dynUid
|
||||
});
|
||||
oRPC.make();
|
||||
document.getElementById('importAjax').style.display = 'none';
|
||||
panelImportDyna.addContent(oRPC.xmlhttp.responseText);
|
||||
},
|
||||
import:function(uidDynaSelect){
|
||||
document.getElementById('importAjax').style.display = 'block';
|
||||
document.getElementById('importForm').style.display = 'none';
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../dynaforms/fieldsHandlerAjax',
|
||||
async : false,
|
||||
method: 'POST',
|
||||
args : 'request=import' + '&DYN_UID=' + this.dynUid + '&FILE=' + uidDynaSelect
|
||||
});
|
||||
oRPC.make();
|
||||
resp = oRPC.xmlhttp.responseText;
|
||||
if (resp == 'success') {
|
||||
location.reload(true);
|
||||
} else {
|
||||
alert("Error: " + resp);
|
||||
}
|
||||
},
|
||||
close:function()
|
||||
{
|
||||
if (!sessionPersits()) {
|
||||
|
||||
@@ -59,136 +59,86 @@ if ((isset( $_FILES['form'] )) && ($_FILES['form']['error']['APP_DOC_FILENAME']
|
||||
die();
|
||||
}
|
||||
|
||||
$docUid = $_POST['form']['DOC_UID'];
|
||||
$appDocUid = $_POST['form']['APP_DOC_UID'];
|
||||
$docVersion = $_POST['form']['docVersion'];
|
||||
$actionType = $_POST['form']['actionType'];
|
||||
G::LoadClass("case");
|
||||
|
||||
//load the variables
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
|
||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], G::getSystemConstants() );
|
||||
$inputDocumentUid = $_GET["UID"]; //$_POST["form"]["DOC_UID"]
|
||||
$appDocUid = $_POST["form"]["APP_DOC_UID"];
|
||||
$docVersion = intval($_POST["form"]["docVersion"]);
|
||||
$appDocType = $_POST["form"]["APP_DOC_TYPE"];
|
||||
$appDocComment = (isset($_POST["form"]["APP_DOC_COMMENT"]))? $_POST["form"]["APP_DOC_COMMENT"] : "";
|
||||
$actionType = $_POST["form"]["actionType"];
|
||||
|
||||
#trigger debug routines...
|
||||
$case = new Cases();
|
||||
$case->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "cases_List");
|
||||
|
||||
//Load the fields
|
||||
$arrayField = $case->loadCase($_SESSION["APPLICATION"]);
|
||||
$arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], G::getSystemConstants());
|
||||
|
||||
//cleaning debug variables
|
||||
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
||||
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = Array ();
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = Array ();
|
||||
//Triggers
|
||||
$arrayTrigger = $case->loadTriggers($_SESSION["TASK"], "INPUT_DOCUMENT", $inputDocumentUid, "AFTER");
|
||||
|
||||
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], 'INPUT_DOCUMENT', $_GET['UID'], 'AFTER' );
|
||||
//Trigger debug routines
|
||||
//Cleaning debug variables
|
||||
$_SESSION["TRIGGER_DEBUG"]["ERRORS"] = array();
|
||||
$_SESSION["TRIGGER_DEBUG"]["DATA"] = array();
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = array();
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_VALUES"] = array();
|
||||
|
||||
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
|
||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
|
||||
$_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] = count($arrayTrigger);
|
||||
$_SESSION["TRIGGER_DEBUG"]["TIME"] = "AFTER";
|
||||
|
||||
if ($_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] > 0) {
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = $case->getTriggerNames($arrayTrigger);
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_VALUES"] = $arrayTrigger;
|
||||
}
|
||||
|
||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||
//Execute after triggers - Start
|
||||
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'INPUT_DOCUMENT', $_GET['UID'], 'AFTER', $Fields['APP_DATA'] );
|
||||
//Execute after triggers - End
|
||||
if ($_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] > 0) {
|
||||
//Trigger - Execute after - Start
|
||||
$arrayField["APP_DATA"] = $case->executeTriggers(
|
||||
$_SESSION["TASK"],
|
||||
"INPUT_DOCUMENT",
|
||||
$inputDocumentUid,
|
||||
"AFTER",
|
||||
$arrayField["APP_DATA"]
|
||||
);
|
||||
//Trigger - Execute after - End
|
||||
}
|
||||
|
||||
//save data
|
||||
$aData = array ();
|
||||
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
||||
$aData['APP_PROC_STATUS'] = $Fields['APP_PROC_STATUS'];
|
||||
$aData['APP_DATA'] = $Fields['APP_DATA'];
|
||||
$aData['DEL_INDEX'] = $_SESSION['INDEX'];
|
||||
$aData['TAS_UID'] = $_SESSION['TASK'];
|
||||
//$aData = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
$oCase->updateCase( $_SESSION['APPLICATION'], $aData );
|
||||
//Save data
|
||||
$arrayData = array();
|
||||
$arrayData["APP_NUMBER"] = $arrayField["APP_NUMBER"];
|
||||
$arrayData["APP_PROC_STATUS"] = $arrayField["APP_PROC_STATUS"];
|
||||
$arrayData["APP_DATA"] = $arrayField["APP_DATA"];
|
||||
$arrayData["DEL_INDEX"] = $_SESSION["INDEX"];
|
||||
$arrayData["TAS_UID"] = $_SESSION["TASK"];
|
||||
|
||||
//save info
|
||||
$case->updateCase($_SESSION["APPLICATION"], $arrayData);
|
||||
|
||||
|
||||
//require_once ("classes/model/AppDocument.php");
|
||||
//require_once ('classes/model/AppFolder.php');
|
||||
//require_once ('classes/model/InputDocument.php');
|
||||
|
||||
$oInputDocument = new InputDocument();
|
||||
$aID = $oInputDocument->load( $_GET['UID'] );
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
|
||||
//Get the Custom Folder ID (create if necessary)
|
||||
$oFolder = new AppFolder();
|
||||
$folderId = $oFolder->createFromPath( $aID['INP_DOC_DESTINATION_PATH'] );
|
||||
|
||||
//Tags
|
||||
$fileTags = $oFolder->parseTags( $aID['INP_DOC_TAGS'] );
|
||||
|
||||
switch ($actionType) {
|
||||
case "R": //replace
|
||||
$aFields = array ('APP_DOC_UID' => $appDocUid,'APP_UID' => $_SESSION['APPLICATION'],'DOC_VERSION' => $docVersion,'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
|
||||
);
|
||||
|
||||
$oAppDocument->update( $aFields );
|
||||
break;
|
||||
case "NV": //New Version
|
||||
|
||||
|
||||
$aFields = array ('APP_DOC_UID' => $appDocUid,'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
|
||||
);
|
||||
|
||||
$oAppDocument->create( $aFields );
|
||||
break;
|
||||
default: //New
|
||||
$aFields = array ('APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
|
||||
);
|
||||
|
||||
$oAppDocument->create( $aFields );
|
||||
break;
|
||||
}
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$iDocVersion = $oAppDocument->getDocVersion();
|
||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||
$ext = (isset( $info['extension'] ) ? $info['extension'] : '');
|
||||
|
||||
//save the file
|
||||
if (! empty( $_FILES['form'] )) {
|
||||
if ($_FILES['form']['error']['APP_DOC_FILENAME'] == 0) {
|
||||
$sPathName = PATH_DOCUMENT . $_SESSION['APPLICATION'] . PATH_SEP;
|
||||
$sFileName = $sAppDocUid . "_" . $iDocVersion . '.' . $ext;
|
||||
G::uploadFile( $_FILES['form']['tmp_name']['APP_DOC_FILENAME'], $sPathName, $sFileName );
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||
$oData['APP_UID'] = $_SESSION['APPLICATION'];
|
||||
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $sPathName . $sFileName, $aFields['APP_DOC_FILENAME'], $sAppDocUid, $iDocVersion );
|
||||
|
||||
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
|
||||
if ($uploadReturn) {
|
||||
$aFields['APP_DOC_PLUGIN'] = $triggerDetail->sNamespace;
|
||||
if (! isset( $aFields['APP_DOC_UID'] )) {
|
||||
$aFields['APP_DOC_UID'] = $sAppDocUid;
|
||||
}
|
||||
if (! isset( $aFields['DOC_VERSION'] )) {
|
||||
$aFields['DOC_VERSION'] = $iDocVersion;
|
||||
}
|
||||
//$oAppDocument1 = new AppDocument();
|
||||
//G::pr($aFields);die;
|
||||
$oAppDocument->update( $aFields );
|
||||
unlink( $sPathName . $sFileName );
|
||||
}
|
||||
}
|
||||
//end plugin
|
||||
}
|
||||
//Add Input Document
|
||||
if (isset($_FILES) && isset($_FILES["form"]) && count($_FILES["form"]) > 0) {
|
||||
$appDocUid = $case->addInputDocument(
|
||||
$inputDocumentUid,
|
||||
$appDocUid,
|
||||
$docVersion,
|
||||
$appDocType,
|
||||
$appDocComment,
|
||||
$actionType,
|
||||
$_SESSION["APPLICATION"],
|
||||
$_SESSION["INDEX"],
|
||||
$_SESSION["TASK"],
|
||||
$_SESSION["USER_LOGGED"],
|
||||
"xmlform",
|
||||
$_FILES["form"]["name"]["APP_DOC_FILENAME"],
|
||||
$_FILES["form"]["error"]["APP_DOC_FILENAME"],
|
||||
$_FILES["form"]["tmp_name"]["APP_DOC_FILENAME"]
|
||||
);
|
||||
}
|
||||
|
||||
//go to the next step
|
||||
//if (!isset($_POST['form']['MORE'])) {
|
||||
if (false) {
|
||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||
$aNextStep = $case->getNextStep($_SESSION["PROCESS"], $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["STEP_POSITION"]);
|
||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||
|
||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||
@@ -212,7 +162,7 @@ if (false) {
|
||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||
die();
|
||||
} else {
|
||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
||||
$aNextStep = $case->getNextStep($_SESSION["PROCESS"], $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["STEP_POSITION"] - 1);
|
||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||
|
||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||
@@ -225,7 +175,7 @@ if (false) {
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
||||
$aNextStep = $case->getNextStep($_SESSION["PROCESS"], $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["STEP_POSITION"] - 1);
|
||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||
|
||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||
|
||||
@@ -94,6 +94,118 @@ switch ($request) {
|
||||
$o->remove( '___pm_boot_strap___' );
|
||||
}
|
||||
break;
|
||||
case 'showImportForm':
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
require_once 'classes/model/Content.php';
|
||||
$uidDynafom = $_POST['DYN_UID'];
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->clearSelectColumns();
|
||||
$oCriteria->addSelectColumn( DynaformPeer::DYN_FILENAME );
|
||||
$oCriteria->addAsColumn( 'DYNA_NAME', 'C_DYNA.CON_VALUE' );
|
||||
$oCriteria->addAsColumn( 'PROC_NAME', 'C_PROC.CON_VALUE' );
|
||||
|
||||
$oCriteria->addAlias("C_DYNA", "CONTENT");
|
||||
$oCriteria->addAlias("C_PROC", "CONTENT");
|
||||
|
||||
$arrayCondition = array();
|
||||
$arrayCondition[] = array(DynaformPeer::DYN_UID, "C_DYNA.CON_ID");
|
||||
$oCriteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
|
||||
$arrayCondition = array();
|
||||
$arrayCondition[] = array(DynaformPeer::PRO_UID, "C_PROC.CON_ID");
|
||||
$oCriteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
|
||||
$oCriteria->add( 'C_DYNA.CON_LANG', SYS_LANG );
|
||||
$oCriteria->add( 'C_DYNA.CON_CATEGORY', 'DYN_TITLE' );
|
||||
|
||||
$oCriteria->add( 'C_PROC.CON_LANG', SYS_LANG );
|
||||
$oCriteria->add( 'C_PROC.CON_CATEGORY', 'PRO_TITLE' );
|
||||
|
||||
$oCriteria->add( DynaformPeer::DYN_UID, $uidDynafom, Criteria::NOT_EQUAL);
|
||||
|
||||
$oCriteria->addAscendingOrderByColumn ('PROC_NAME');
|
||||
$oCriteria->addAscendingOrderByColumn ('DYNA_NAME');
|
||||
$oDataset = DynaformPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
|
||||
$select = '<select name="form[IMPORT_DYNA]" id="form[IMPORT_DYNA]" width="300" style="width: 300px" class="module_app_input___gray">';
|
||||
$selectGroup = '';
|
||||
while (is_array( $aRow )) {
|
||||
if ($selectGroup != $aRow['PROC_NAME']) {
|
||||
if ($selectGroup != '') {
|
||||
$select .= '</optgroup>';
|
||||
}
|
||||
$selectGroup = $aRow['PROC_NAME'];
|
||||
$select .= '<optgroup label="' . $aRow['PROC_NAME'] . '">';
|
||||
}
|
||||
$select .= '<option value="' . $aRow['DYN_FILENAME'] . '">' . $aRow['DYNA_NAME'] . '</option>';
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
}
|
||||
|
||||
$select .= '</optgroup></select>';
|
||||
$html = '<div id="importForm"><table width="100%" cellspacing="3" cellpadding="3" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="" colspan="2" style="background: none repeat scroll 0 0 #E0E7EF; border-bottom: 1px solid #C3D1DF;
|
||||
color: #000000; font-weight: bold; padding-left: 5px; text-shadow: 0 1px 0 #FFFFFF;
|
||||
font: 8px">
|
||||
<span>' . G::LoadTranslation('ID_SELECT_DYNAFORM_IMPORT') . '</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="font: 11px/180% sans-serif,MiscFixed; color: #808080; text-align: right;">
|
||||
<label for="form[IMPORT_DYNA]">' . G::LoadTranslation('ID_DYNAFORM') . '</label>
|
||||
</td>
|
||||
<td width="615" class="FormFieldContent">' . $select . '
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2" class="FormButton">
|
||||
<input type="button" onclick="dynaformEditor.import(document.getElementById('form[IMPORT_DYNA]').value);" value="' . G::LoadTranslation('ID_IMPORT') . '" class="module_app_button___gray " style="">
|
||||
<input type="button" onclick="panelImportDyna.remove();" value="' . G::LoadTranslation('ID_CANCEL') . '" class="module_app_button___gray " style="">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><div>';
|
||||
echo $html;
|
||||
break;
|
||||
case 'import':
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
$uidDynafom = $_POST['DYN_UID'];
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->clearSelectColumns();
|
||||
$oCriteria->addSelectColumn( DynaformPeer::DYN_FILENAME );
|
||||
$oCriteria->add( DynaformPeer::DYN_UID, $uidDynafom, Criteria::EQUAL);
|
||||
$oDataset = DynaformPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
$dynaFile = PATH_DYNAFORM . $aRow['DYN_FILENAME'] . '.xml';
|
||||
$importFile = PATH_DYNAFORM . $_POST['FILE'] . '.xml';
|
||||
|
||||
$importFp = fopen ($importFile, "r+");
|
||||
$fileText = fread($importFp, filesize($importFile));
|
||||
fclose ( $importFp );
|
||||
$newFile = str_replace($_POST['FILE'], $aRow['DYN_FILENAME'], $fileText);
|
||||
|
||||
$dynaFileTmp = PATH_DYNAFORM . $aRow['DYN_FILENAME'] . '_tmp0.xml';
|
||||
$dynafmFp = fopen ($dynaFileTmp,"w+");
|
||||
fwrite ( $dynafmFp, $newFile);
|
||||
fclose ( $dynafmFp );
|
||||
|
||||
/*
|
||||
$dynafmFp = fopen ($dynaFile,"w+");
|
||||
fwrite ( $dynafmFp, $newFile);
|
||||
fclose ( $dynafmFp );
|
||||
*/
|
||||
echo 'success';
|
||||
break;
|
||||
default:
|
||||
echo 'no request param.';
|
||||
}
|
||||
|
||||
@@ -42,9 +42,10 @@ try {
|
||||
$oData = G::json_decode( stripslashes( $_REQUEST['data'] ) );
|
||||
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
|
||||
$sOutput = '';
|
||||
$sTask = '';
|
||||
}
|
||||
|
||||
G::LoadClass( 'processMap' );
|
||||
//G::LoadClass( 'processMap' );
|
||||
$oProcessMap = new processMap( new DBConnection() );
|
||||
|
||||
switch ($_REQUEST['action']) {
|
||||
|
||||
@@ -4,7 +4,7 @@ $request = isset( $_REQUEST['request'] ) ? $_REQUEST['request'] : null;
|
||||
switch ($request) {
|
||||
case 'getLangList':
|
||||
|
||||
$Translations = G::getModel( 'Translation' );
|
||||
$Translations = new Translation();
|
||||
$result = new stdClass();
|
||||
$result->rows = Array ();
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Ext.onReady(function(){
|
||||
hiddenName: 'LDAP_TYPE',
|
||||
store: new Ext.data.SimpleStore({
|
||||
fields: ['ldap','ad'],
|
||||
data : my_values
|
||||
data : my_values
|
||||
}),
|
||||
displayField: 'ldap',
|
||||
typeAhead: true,
|
||||
@@ -48,10 +48,8 @@ Ext.onReady(function(){
|
||||
listeners:{
|
||||
select: function(c,d,i){
|
||||
if(i){
|
||||
formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber');
|
||||
formAuthSourceE.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('samaccountname');
|
||||
} else {
|
||||
formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile');
|
||||
formAuthSourceE.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('uid');
|
||||
}
|
||||
}
|
||||
@@ -59,8 +57,8 @@ Ext.onReady(function(){
|
||||
});
|
||||
|
||||
var txtServerName=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_SERVER_NAME',
|
||||
fieldLabel: _('ID_SERVER_NAME'),
|
||||
id: 'AUTH_SOURCE_SERVER_NAME',
|
||||
fieldLabel: _('ID_SERVER_NAME'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
@@ -75,8 +73,8 @@ Ext.onReady(function(){
|
||||
});
|
||||
|
||||
var txtPort=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_PORT',
|
||||
fieldLabel: _('ID_PORT'),
|
||||
id: 'AUTH_SOURCE_PORT',
|
||||
fieldLabel: _('ID_PORT'),
|
||||
xtype:'textfield',
|
||||
value:'389',
|
||||
width: 200,
|
||||
@@ -123,11 +121,11 @@ Ext.onReady(function(){
|
||||
|
||||
|
||||
var txtBaseDN=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_BASE_DN',
|
||||
fieldLabel: _('ID_BASE_DN'),
|
||||
id: 'AUTH_SOURCE_BASE_DN',
|
||||
fieldLabel: _('ID_BASE_DN'),
|
||||
xtype:'textfield',
|
||||
value:sUID,
|
||||
width: 200,
|
||||
width: 300,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '10', autocomplete: 'off', maxlength: '128'},
|
||||
allowBlank: false,
|
||||
listeners: {
|
||||
@@ -163,20 +161,20 @@ Ext.onReady(function(){
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").show();
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(true);
|
||||
}else{
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").hide();
|
||||
txtSearchUser.getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").hide();
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||
}
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var txtSearchUser=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_SEARCH_USER',
|
||||
fieldLabel: _('ID_SEARCH_USER'),
|
||||
id: 'AUTH_SOURCE_SEARCH_USER',
|
||||
fieldLabel: _('ID_SEARCH_USER'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
@@ -191,7 +189,7 @@ Ext.onReady(function(){
|
||||
|
||||
var txtPassword=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_PASSWORD',
|
||||
fieldLabel: _('ID_CACHE_PASSWORD'),
|
||||
fieldLabel: _('ID_CACHE_PASSWORD'),
|
||||
xtype:'textfield',
|
||||
inputType:'password',
|
||||
value:'',
|
||||
@@ -208,7 +206,7 @@ Ext.onReady(function(){
|
||||
//Identifier for an imported user
|
||||
var txtIdentifier=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
@@ -221,28 +219,13 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
//Object Classes
|
||||
var txtaClass=new Ext.form.TextArea({
|
||||
id: 'AUTH_SOURCE_OBJECT_CLASSES',
|
||||
fieldLabel: _('ID_OBJECT_CLASS'),
|
||||
xtype:'textarea',
|
||||
value:'*',
|
||||
width: 200,
|
||||
allowBlank: false,
|
||||
listeners: {
|
||||
'render': function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
}, c);
|
||||
}
|
||||
}
|
||||
});
|
||||
//Additional Filter
|
||||
var txtoAddFilter=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_ADDITIONAL_FILTER',
|
||||
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
||||
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
width: 300,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
||||
allowBlank: true,
|
||||
listeners: {
|
||||
@@ -252,21 +235,6 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
//Attributes
|
||||
var txtAttributes=new Ext.form.TextArea({
|
||||
id: 'AUTH_SOURCE_ATTRIBUTES',
|
||||
fieldLabel: _('ID_ATTRIBUTES'),
|
||||
xtype:'textArea',
|
||||
value:'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile',
|
||||
width: 200,
|
||||
allowBlank: false,
|
||||
listeners: {
|
||||
'render': function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
}, c);
|
||||
}
|
||||
}
|
||||
});
|
||||
//here we are setting the fields
|
||||
fieldsAS = new Ext.form.FieldSet({
|
||||
title: _('ID_AUTHENTICATION_SOURCE_INF_TITLE'),
|
||||
@@ -274,7 +242,7 @@ Ext.onReady(function(){
|
||||
txtSourceId,
|
||||
txtName,
|
||||
cboxType,
|
||||
txtServerName,
|
||||
txtServerName,
|
||||
txtPort,
|
||||
cboxTLS,
|
||||
cboxVersion,
|
||||
@@ -283,14 +251,12 @@ Ext.onReady(function(){
|
||||
txtSearchUser,
|
||||
txtPassword ,
|
||||
txtIdentifier,
|
||||
txtaClass,
|
||||
txtoAddFilter,
|
||||
txtAttributes
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
formAuthSourceE = new Ext.FormPanel({
|
||||
id:'formAuthSourceE',
|
||||
id:'formAuthSourceE',
|
||||
labelWidth: 250,
|
||||
labelAlign:'right',
|
||||
autoScroll: true,
|
||||
@@ -304,7 +270,7 @@ Ext.onReady(function(){
|
||||
allowBlank: false,
|
||||
resizable: true,
|
||||
msgTarget: 'side',
|
||||
align:'center'
|
||||
align:'center'
|
||||
},
|
||||
items:[
|
||||
fieldsAS
|
||||
@@ -312,19 +278,19 @@ Ext.onReady(function(){
|
||||
buttons: [
|
||||
{
|
||||
text: _('ID_SAVE'),
|
||||
handler: saveAuthSources
|
||||
handler: saveAuthSources
|
||||
},
|
||||
{
|
||||
{
|
||||
text: _('ID_CANCEL'),
|
||||
handler: goback
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
});
|
||||
|
||||
formAuthSourceE.render(document.body);
|
||||
loadAuthSourceData(sUID, txtSearchUser, txtPassword);
|
||||
|
||||
|
||||
});
|
||||
function goback(){
|
||||
window.location = 'authSources_List';
|
||||
@@ -334,7 +300,7 @@ Ext.onReady(function(){
|
||||
url: '../adminProxy/saveAuthSources',
|
||||
params: {
|
||||
// action : 'tryit',
|
||||
AUTH_SOURCE_UID: formAuthSourceE.getForm().findField('AUTH_SOURCE_UID').getValue(),
|
||||
AUTH_SOURCE_UID: formAuthSourceE.getForm().findField('AUTH_SOURCE_UID').getValue(),
|
||||
AUTH_SOURCE_NAME: formAuthSourceE.getForm().findField('AUTH_SOURCE_NAME').getValue(),
|
||||
LDAP_TYPE: formAuthSourceE.getForm().findField('LDAP_TYPE').getValue(),
|
||||
AUTH_SOURCE_SERVER_NAME: formAuthSourceE.getForm().findField('AUTH_SOURCE_SERVER_NAME').getValue(),
|
||||
@@ -344,14 +310,12 @@ Ext.onReady(function(){
|
||||
AUTH_SOURCE_SEARCH_USER: formAuthSourceE.getForm().findField('AUTH_SOURCE_SEARCH_USER').getValue(),
|
||||
AUTH_SOURCE_PASSWORD: formAuthSourceE.getForm().findField('AUTH_SOURCE_PASSWORD').getValue(),
|
||||
AUTH_SOURCE_VERSION: formAuthSourceE.getForm().findField('AUTH_SOURCE_VERSION').getValue(),
|
||||
AUTH_SOURCE_BASE_DN: formAuthSourceE.getForm().findField('AUTH_SOURCE_BASE_DN').getValue(),
|
||||
AUTH_SOURCE_OBJECT_CLASSES: formAuthSourceE.getForm().findField('AUTH_SOURCE_OBJECT_CLASSES').getValue(),
|
||||
AUTH_SOURCE_ATTRIBUTES: formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').getValue()
|
||||
AUTH_SOURCE_BASE_DN: formAuthSourceE.getForm().findField('AUTH_SOURCE_BASE_DN').getValue()
|
||||
},
|
||||
waitMsg : 'testing...',
|
||||
waitMsg : _('ID_SAVING'),
|
||||
timeout : 3600,
|
||||
success: function(f,a){
|
||||
|
||||
|
||||
resp = Ext.util.JSON.decode(a.response.responseText);
|
||||
if (resp.success){
|
||||
window.location = 'authSources_List';
|
||||
@@ -367,7 +331,7 @@ Ext.onReady(function(){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Load authosource data for the Edit mode
|
||||
function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
||||
Ext.Ajax.request({
|
||||
@@ -376,7 +340,7 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
||||
'action': 'loadauthSourceData',
|
||||
sUID:sUID
|
||||
},
|
||||
waitMsg: _('ID_UPLOADING_PROCESS_FILE'),
|
||||
waitMsg: _('ID_UPLOADING_PROCESS_FILE'),
|
||||
success: function(r,o){
|
||||
var data = Ext.util.JSON.decode(r.responseText);
|
||||
|
||||
@@ -388,16 +352,16 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").show();
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(true);
|
||||
}else{
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").hide();
|
||||
txtSearchUser.getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").hide();
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||
}
|
||||
|
||||
Ext.getCmp('formAuthSourceE').getForm().setValues({
|
||||
|
||||
|
||||
AUTH_SOURCE_UID: data.sources.AUTH_SOURCE_UID,
|
||||
AUTH_SOURCE_NAME: data.sources.AUTH_SOURCE_NAME ,
|
||||
LDAP_TYPE: (data.sources.LDAP_TYPE=='ad')?'Active Directory':data.sources.LDAP_TYPE,
|
||||
@@ -410,8 +374,6 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
||||
AUTH_SOURCE_IDENTIFIER_FOR_USER: data.sources.AUTH_SOURCE_IDENTIFIER_FOR_USER,
|
||||
AUTH_SOURCE_VERSION: data.sources.AUTH_SOURCE_VERSION,
|
||||
AUTH_SOURCE_BASE_DN: data.sources.AUTH_SOURCE_BASE_DN,
|
||||
AUTH_SOURCE_OBJECT_CLASSES: data.sources.AUTH_SOURCE_OBJECT_CLASSES,
|
||||
AUTH_SOURCE_ATTRIBUTES:data.sources.AUTH_SOURCE_ATTRIBUTES,
|
||||
AUTH_SOURCE_ADDITIONAL_FILTER:data.sources.AUTH_SOURCE_ADDITIONAL_FILTER
|
||||
})
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ Ext.onReady(function(){
|
||||
hiddenName: 'LDAP_TYPE',
|
||||
store: new Ext.data.SimpleStore({
|
||||
fields: ['ldap','ad'],
|
||||
data : my_values
|
||||
data : my_values
|
||||
}),
|
||||
displayField: 'ldap',
|
||||
typeAhead: true,
|
||||
@@ -59,10 +59,8 @@ Ext.onReady(function(){
|
||||
listeners:{
|
||||
select: function(c,d,i){
|
||||
if(i){
|
||||
formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber');
|
||||
formAuthSource.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('samaccountname');
|
||||
} else {
|
||||
formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile');
|
||||
formAuthSource.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('uid');
|
||||
}
|
||||
}
|
||||
@@ -71,7 +69,7 @@ Ext.onReady(function(){
|
||||
|
||||
var txtServerName=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_SERVER_NAME',
|
||||
fieldLabel: _('ID_SERVER_NAME'),
|
||||
fieldLabel: _('ID_SERVER_NAME'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
@@ -87,7 +85,7 @@ Ext.onReady(function(){
|
||||
|
||||
var txtPort=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_PORT',
|
||||
fieldLabel: _('ID_PORT'),
|
||||
fieldLabel: _('ID_PORT'),
|
||||
xtype:'textfield',
|
||||
value:'389',
|
||||
width: 200,
|
||||
@@ -143,7 +141,7 @@ Ext.onReady(function(){
|
||||
fieldLabel: _('ID_BASE_DN'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
width: 300,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '10', autocomplete: 'off', maxlength: '128'},
|
||||
allowBlank: false,
|
||||
listeners: {
|
||||
@@ -181,20 +179,20 @@ Ext.onReady(function(){
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").show();
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(true);
|
||||
}else{
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").hide();
|
||||
txtSearchUser.getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").hide();
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var txtSearchUser=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_SEARCH_USER',
|
||||
fieldLabel: _('ID_SEARCH_USER'),
|
||||
fieldLabel: _('ID_SEARCH_USER'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
@@ -209,7 +207,7 @@ Ext.onReady(function(){
|
||||
|
||||
var txtPassword=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_PASSWORD',
|
||||
fieldLabel: _('ID_CACHE_PASSWORD'),
|
||||
fieldLabel: _('ID_CACHE_PASSWORD'),
|
||||
xtype:'textfield',
|
||||
inputType:'password',
|
||||
value:'',
|
||||
@@ -226,7 +224,7 @@ Ext.onReady(function(){
|
||||
//Identifier for an imported user
|
||||
var txtIdentifier=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||
xtype:'textfield',
|
||||
value:'uid',
|
||||
width: 200,
|
||||
@@ -239,28 +237,13 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
//Object Classes
|
||||
var txtaClass=new Ext.form.TextArea({
|
||||
id: 'AUTH_SOURCE_OBJECT_CLASSES',
|
||||
fieldLabel: _('ID_OBJECT_CLASS'),
|
||||
xtype:'textarea',
|
||||
value:'*',
|
||||
width: 200,
|
||||
allowBlank: false,
|
||||
listeners: {
|
||||
'render': function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
}, c);
|
||||
}
|
||||
}
|
||||
});
|
||||
//Additional Filter
|
||||
var txtoAddFilter=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_ADDITIONAL_FILTER',
|
||||
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
||||
xtype:'textfield',
|
||||
value:'',
|
||||
width: 200,
|
||||
width: 300,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
||||
allowBlank: true,
|
||||
listeners: {
|
||||
@@ -270,21 +253,6 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
//Attributes
|
||||
var txtAttributes=new Ext.form.TextArea({
|
||||
id: 'AUTH_SOURCE_ATTRIBUTES',
|
||||
fieldLabel: _('ID_ATTRIBUTES'),
|
||||
xtype:'textArea',
|
||||
value:'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile',
|
||||
width: 200,
|
||||
allowBlank: false,
|
||||
listeners: {
|
||||
'render': function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
}, c);
|
||||
}
|
||||
}
|
||||
});
|
||||
//here we are setting the fields
|
||||
fieldsAS = new Ext.form.FieldSet({
|
||||
title: _('ID_AUTHENTICATION_SOURCE_INFORMATION'),
|
||||
@@ -302,9 +270,7 @@ Ext.onReady(function(){
|
||||
txtSearchUser,
|
||||
txtPassword ,
|
||||
txtIdentifier,
|
||||
txtaClass,
|
||||
txtoAddFilter,
|
||||
txtAttributes
|
||||
txtoAddFilter
|
||||
]
|
||||
});
|
||||
|
||||
@@ -333,18 +299,18 @@ Ext.onReady(function(){
|
||||
{
|
||||
text: _('ID_SAVE'),
|
||||
handler: TestSite
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
{
|
||||
text: _('ID_CANCEL'),
|
||||
handler: goback
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
});
|
||||
|
||||
formAuthSource.render(document.body);
|
||||
|
||||
|
||||
});
|
||||
function goback(){
|
||||
window.location = 'authSources_List';
|
||||
@@ -354,7 +320,7 @@ Ext.onReady(function(){
|
||||
url: '../adminProxy/saveAuthSources',
|
||||
params: {
|
||||
// action : 'tryit',
|
||||
AUTH_SOURCE_UID: formAuthSource.getForm().findField('AUTH_SOURCE_UID').getValue(),
|
||||
AUTH_SOURCE_UID: formAuthSource.getForm().findField('AUTH_SOURCE_UID').getValue(),
|
||||
AUTH_SOURCE_NAME: formAuthSource.getForm().findField('AUTH_SOURCE_NAME').getValue(),
|
||||
LDAP_TYPE: formAuthSource.getForm().findField('LDAP_TYPE').getValue(),
|
||||
AUTH_SOURCE_SERVER_NAME: formAuthSource.getForm().findField('AUTH_SOURCE_SERVER_NAME').getValue(),
|
||||
@@ -365,15 +331,13 @@ Ext.onReady(function(){
|
||||
AUTH_SOURCE_PASSWORD: formAuthSource.getForm().findField('AUTH_SOURCE_PASSWORD').getValue(),
|
||||
AUTH_SOURCE_VERSION: formAuthSource.getForm().findField('AUTH_SOURCE_VERSION').getValue(),
|
||||
AUTH_SOURCE_BASE_DN: formAuthSource.getForm().findField('AUTH_SOURCE_BASE_DN').getValue(),
|
||||
AUTH_SOURCE_OBJECT_CLASSES: formAuthSource.getForm().findField('AUTH_SOURCE_OBJECT_CLASSES').getValue(),
|
||||
AUTH_SOURCE_ATTRIBUTES: formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').getValue(),
|
||||
AUTH_SOURCE_ADDITIONAL_FILTER: formAuthSource.getForm().findField('AUTH_SOURCE_ADDITIONAL_FILTER').getValue()
|
||||
|
||||
|
||||
},
|
||||
waitMsg : 'testing...',
|
||||
waitMsg : _('ID_SAVING'),
|
||||
timeout : 3600,
|
||||
success: function(f,a){
|
||||
|
||||
|
||||
resp = Ext.util.JSON.decode(a.response.responseText);
|
||||
if (resp.success){
|
||||
window.location = 'authSources_List';
|
||||
|
||||
@@ -70,9 +70,6 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
error_log("\n*****\n", 3, "/home/victor/MyLog.log");
|
||||
error_log(print_r($oTree, true), 3, "/home/victor/MyLog.log");
|
||||
|
||||
echo $oTree->render();
|
||||
} catch (Exception $e) {
|
||||
die($e->getMessage());
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<en>Delete</en>
|
||||
</DBS_DELETE>
|
||||
|
||||
<GET_UID type="link" colWidth="40" value="UID" link="#" onclick="msgBox('UID: '+@QDBS_UID, 'info');return false;"/>
|
||||
<GET_UID type="link" colWidth="40" value="UID" link="#" onclick="msgBox('UID: '+@QDBS_UID, 'info');return false;"/>
|
||||
|
||||
|
||||
</dynaForm>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
popupWindow('@G::LoadTranslation(ID_EDIT_FIELD)', '@G::encryptlink(@#fields_Edit)?A=@%URL&XMLNODE_NAME='+ uid , 500, 650, null,false,true);
|
||||
}
|
||||
function fieldsSave( form ) {
|
||||
alert("save");
|
||||
if (pme_validating) {
|
||||
validatingForm=form;
|
||||
setTimeout('fieldsSave(validatingForm);',100);
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
<saveasDyna type="toolButton" class="ss_sprite button_toolbar ss_disk_multiple" onclick="dynaformEditor.save_as()" buttonType="class">
|
||||
<en>Save as</en>
|
||||
</saveasDyna>
|
||||
<importDyna type="toolButton" class="ss_sprite button_toolbar ss_application_side_expand" onclick="dynaformEditor.importForm()" buttonType="class">
|
||||
<en>Import</en>
|
||||
</importDyna>
|
||||
<!--.-->
|
||||
<separator2 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<text type="toolButton" class="ss_sprite button_toolbar ss_textfield" onclick="fieldsAdd('text')" buttonType="class">
|
||||
|
||||
@@ -13,10 +13,12 @@
|
||||
</LBLTITLE1>
|
||||
|
||||
<PROCESS_UID type="dropdown" dependentfields="TRIGGER_UID">
|
||||
<![CDATA[
|
||||
SELECT PRO.PRO_UID, CON.CON_VALUE
|
||||
FROM PROCESS AS PRO, CONTENT AS CON
|
||||
WHERE PRO.PRO_UID = CON.CON_ID AND CON.CON_CATEGORY = 'PRO_TITLE' AND CON.CON_LANG = '@#LANG'
|
||||
ORDER BY CON.CON_VALUE ASC
|
||||
]]>
|
||||
|
||||
<en>
|
||||
Process
|
||||
@@ -25,11 +27,13 @@
|
||||
</PROCESS_UID>
|
||||
|
||||
<TRIGGER_UID type="dropdown" dependentfields="TRI_DESCRIPTION,TRI_WEBBOT">
|
||||
<![CDATA[
|
||||
SELECT TGR.TRI_UID, CON.CON_VALUE
|
||||
FROM TRIGGERS AS TGR, CONTENT AS CON
|
||||
WHERE TGR.PRO_UID = '@#PROCESS_UID' AND
|
||||
TGR.TRI_UID = CON.CON_ID AND CON.CON_CATEGORY = 'TRI_TITLE' AND CON.CON_LANG = '@#LANG'
|
||||
ORDER BY CON.CON_VALUE ASC
|
||||
]]>
|
||||
|
||||
<en>
|
||||
Trigger
|
||||
@@ -42,17 +46,21 @@
|
||||
</TRI_TITLE>
|
||||
|
||||
<TRI_DESCRIPTION type="textarea" rows="3" cols="67">
|
||||
<![CDATA[
|
||||
SELECT CON.CON_VALUE
|
||||
FROM CONTENT AS CON
|
||||
WHERE CON.CON_ID = '@#TRIGGER_UID' AND CON.CON_CATEGORY = 'TRI_DESCRIPTION' AND CON.CON_LANG = '@#LANG'
|
||||
]]>
|
||||
|
||||
<en>Description of the new trigger</en>
|
||||
</TRI_DESCRIPTION>
|
||||
|
||||
<TRI_WEBBOT type="textarea" rows="10" cols="67" readonly="1">
|
||||
<![CDATA[
|
||||
SELECT TGR.TRI_WEBBOT
|
||||
FROM TRIGGERS AS TGR
|
||||
WHERE TGR.TRI_UID = '@#TRIGGER_UID'
|
||||
]]>
|
||||
|
||||
<en>Script</en>
|
||||
</TRI_WEBBOT>
|
||||
|
||||
@@ -57,9 +57,10 @@ define( 'PATH_OUTTRUNK', $pathOutTrunk );
|
||||
define( 'PATH_HTML', PATH_HOME . 'public_html' . PATH_SEP );
|
||||
|
||||
//this is the first path, if the file exists...
|
||||
$request = substr($_SERVER['REQUEST_URI'],1,strlen($_SERVER['REQUEST_URI']));
|
||||
$fileWithoutParam = explode("?",$request);
|
||||
$requestFile = PATH_HTML . $fileWithoutParam[0];
|
||||
$request = substr($_SERVER['REQUEST_URI'], 1, strlen($_SERVER['REQUEST_URI'])); //removes the first '/'
|
||||
$fileWithoutParam = explode("?", $request); // split the URI by '?'
|
||||
$request = $fileWithoutParam[0]; // get the first element of the split URI
|
||||
$requestFile = PATH_HTML . $request; // temporary assemble a path for the file embedded in the URI
|
||||
if (file_exists($requestFile)) {
|
||||
if (!is_file($requestFile)) {
|
||||
header( "location: /errors/error404.php?url=" . urlencode( $_SERVER['REQUEST_URI'] ) );
|
||||
@@ -70,8 +71,10 @@ if (file_exists($requestFile)) {
|
||||
if($pos < $size) {
|
||||
//if this file got an extension then assign the content
|
||||
$ext_file = substr($request, $pos, $size);
|
||||
if ($ext_file == "gif" || $ext_file == "png" || $ext_file == "jpg") {
|
||||
if ($ext_file == "gif" || $ext_file == "png") {
|
||||
$ext_file = 'image/'.$ext_file ;
|
||||
} elseif ($ext_file == "jpg" || $ext_file == "jpeg") {
|
||||
$ext_file = 'image/jpeg';
|
||||
} elseif ($ext_file == "swf") {
|
||||
$ext_file = "application/x-shockwave-flash";
|
||||
} elseif ($ext_file == "json" || $ext_file == "htc" ) {
|
||||
@@ -116,6 +119,7 @@ if (file_exists($requestFile)) {
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
// Defining RBAC Paths constants
|
||||
define( 'PATH_RBAC_HOME', PATH_TRUNK . 'rbac' . PATH_SEP );
|
||||
|
||||
@@ -154,12 +158,6 @@ define( 'PATH_RBAC_MSSQL_DATA', PATH_RBAC_CORE . 'data' . PATH_SEP . 'mssql' . P
|
||||
define( 'PATH_CONTROLLERS', PATH_CORE . 'controllers' . PATH_SEP );
|
||||
define( 'PATH_SERVICES_REST', PATH_CORE . 'services' . PATH_SEP . 'rest' . PATH_SEP );
|
||||
|
||||
//TEST
|
||||
//if($_SERVER['REQUEST_URI'] == "/sysworkflow/en/classic/processes/mainInit")
|
||||
//{
|
||||
// echo PATH_TRUNK . "engine/methods/processes/mainInit.php";
|
||||
//}
|
||||
|
||||
// include Gulliver Class
|
||||
require_once (PATH_GULLIVER . PATH_SEP . 'class.bootstrap.php');
|
||||
|
||||
@@ -430,10 +428,12 @@ Bootstrap::registerClass('Calendar', PATH_HOME . "engine/classes/class.calen
|
||||
Bootstrap::registerClass('processMap', PATH_HOME . "engine/classes/class.processMap.php");
|
||||
|
||||
//DATABASE propel classes used in 'Cases' Options
|
||||
Bootstrap::registerClass('Entity_Base', PATH_HOME . "engine/classes/entities/Base.php");
|
||||
Bootstrap::registerClass('Entity_Base', PATH_HOME . "engine/classes/entities/Base.php");
|
||||
|
||||
Bootstrap::registerClass('BaseContent', PATH_HOME . "engine/classes/model/om/BaseContent.php");
|
||||
Bootstrap::registerClass('Content', PATH_HOME . "engine/classes/model/Content.php");
|
||||
Bootstrap::registerClass('BaseContentPeer', PATH_HOME . "engine/classes/model/om/BaseContentPeer.php");
|
||||
Bootstrap::registerClass('ContentPeer', PATH_HOME . "engine/classes/model/ContentPeer.php");
|
||||
Bootstrap::registerClass('BaseApplication', PATH_HOME . "engine/classes/model/om/BaseApplication.php");
|
||||
Bootstrap::registerClass('ApplicationPeer', PATH_HOME . "engine/classes/model/ApplicationPeer.php");
|
||||
Bootstrap::registerClass('Application', PATH_HOME . "engine/classes/model/Application.php");
|
||||
@@ -473,6 +473,10 @@ Bootstrap::registerClass('BaseAppHistory', PATH_HOME . "engine/classes/model
|
||||
Bootstrap::registerClass('AppHistory', PATH_HOME . "engine/classes/model/AppHistory.php");
|
||||
Bootstrap::registerClass('AppHistoryPeer', PATH_HOME . "engine/classes/model/AppHistoryPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseAppFolder', PATH_HOME . "engine/classes/model/om/BaseAppFolder.php");
|
||||
Bootstrap::registerClass('AppFolder', PATH_HOME . "engine/classes/model/AppFolder.php");
|
||||
Bootstrap::registerClass('AppFolderPeer', PATH_HOME . "engine/classes/model/AppFolderPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseAppMessage', PATH_HOME . "engine/classes/model/om/BaseAppMessage.php");
|
||||
Bootstrap::registerClass('AppMessage', PATH_HOME . "engine/classes/model/AppMessage.php");
|
||||
Bootstrap::registerClass('BaseAppMessagePeer', PATH_HOME . "engine/classes/model/om/BaseAppMessagePeer.php");
|
||||
@@ -495,8 +499,8 @@ Bootstrap::registerClass('BaseAppThread', PATH_HOME . "engine/classes/mode
|
||||
Bootstrap::registerClass('AppThread', PATH_HOME . "engine/classes/model/AppThread.php");
|
||||
Bootstrap::registerClass('AppThreadPeer', PATH_HOME . "engine/classes/model/AppThreadPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseCaseScheduler', PATH_HOME . "engine/classes/model/om/BaseCaseScheduler.php");
|
||||
Bootstrap::registerClass('CaseScheduler', PATH_HOME . "engine/classes/model/CaseScheduler.php");
|
||||
Bootstrap::registerClass('BaseCaseScheduler', PATH_HOME . "engine/classes/model/om/BaseCaseScheduler.php");
|
||||
Bootstrap::registerClass('CaseScheduler', PATH_HOME . "engine/classes/model/CaseScheduler.php");
|
||||
|
||||
Bootstrap::registerClass('BaseCaseTracker', PATH_HOME . "engine/classes/model/om/BaseCaseTracker.php");
|
||||
Bootstrap::registerClass('CaseTracker', PATH_HOME . "engine/classes/model/CaseTracker.php");
|
||||
@@ -579,6 +583,9 @@ Bootstrap::registerClass('StepPeer', PATH_HOME . "engine/classes/mode
|
||||
Bootstrap::registerClass('BaseStepSupervisor', PATH_HOME . "engine/classes/model/om/BaseStepSupervisor.php");
|
||||
Bootstrap::registerClass('StepSupervisor', PATH_HOME . "engine/classes/model/StepSupervisor.php");
|
||||
|
||||
Bootstrap::registerClass('BaseStepSupervisorPeer',PATH_HOME . "engine/classes/model/om/BaseStepSupervisorPeer.php");
|
||||
Bootstrap::registerClass('StepSupervisorPeer', PATH_HOME . "engine/classes/model/StepSupervisorPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseStepTrigger', PATH_HOME . "engine/classes/model/om/BaseStepTrigger.php");
|
||||
Bootstrap::registerClass('StepTrigger', PATH_HOME . "engine/classes/model/StepTrigger.php");
|
||||
Bootstrap::registerClass('StepTriggerPeer', PATH_HOME . "engine/classes/model/StepTriggerPeer.php");
|
||||
@@ -608,6 +615,7 @@ Bootstrap::registerClass('TaskUser', PATH_HOME . "engine/classes/mode
|
||||
|
||||
Bootstrap::registerClass('BaseTriggers', PATH_HOME . "engine/classes/model/om/BaseTriggers.php");
|
||||
Bootstrap::registerClass('Triggers', PATH_HOME . "engine/classes/model/Triggers.php");
|
||||
Bootstrap::registerClass('BaseTriggersPeer', PATH_HOME . "engine/classes/model/om/BaseTriggersPeer.php");
|
||||
Bootstrap::registerClass('TriggersPeer', PATH_HOME . "engine/classes/model/TriggersPeer.php");
|
||||
|
||||
Bootstrap::registerClass('BaseUsers', PATH_HOME . "engine/classes/model/om/BaseUsers.php");
|
||||
|
||||
Reference in New Issue
Block a user