This commit is contained in:
Andrea Adamczyk
2019-08-21 08:45:41 -04:00
parent 8e67568adf
commit 1eeb5cbd26
11 changed files with 7 additions and 937 deletions

View File

@@ -54,9 +54,12 @@ workflow/engine/controllers/dashboard.php
workflow/engine/controllers/installer.php
workflow/engine/includes/inc.JSForms.php
workflow/engine/js/cases/core/cases_Step_Pmdynaform.js
workflow/engine/js/cases/reassignByUser.js
workflow/engine/methods/cases/casesDemo.php
workflow/engine/methods/cases/cases_ReassignByUser.php
workflow/engine/methods/cases/cases_Scheduler_Save.php
workflow/engine/methods/cases/cases_Scheduler_Update.php
workflow/engine/methods/cases/cases_UsersReassign.php
workflow/engine/methods/cases/proxyPMTablesSaveFields.php
workflow/engine/methods/cases/proxyProcessList.php
workflow/engine/methods/cases/saveFormSupervisor.php
@@ -102,8 +105,12 @@ workflow/engine/templates/cases/casesDemo.html
workflow/engine/templates/cases/cases_Step_Pmdynaform.html
workflow/engine/templates/cases/cases_Step_Pmdynaform_Preview.html
workflow/engine/templates/cases/cases_Step_Pmdynaform_View.html
workflow/engine/templates/cases/cases_UsersReassignCases.html
workflow/engine/templates/login/init.js
workflow/engine/templates/reportTables/mainLoad.php
workflow/engine/test
workflow/engine/xmlform/cases/cases_ReassignBy.xml
workflow/engine/xmlform/users/users_List.xml
workflow/engine/xmlform/users/users_Options.xml
workflow/public_html/skins/JSForms.js
workflow/public_html/skins/ajax.js

View File

@@ -30704,42 +30704,6 @@ msgstr "Reasignado a"
msgid "BACK"
msgstr "ATRÁS"
# cases/cases_ReassignBy.xml?title
# cases/cases_ReassignBy.xml
#: subtitle - title
msgid "<center>Reassignment of Cases</center>"
msgstr "<center>Reasignación de Casos</center>"
# cases/cases_ReassignBy.xml?REASSIGN_BY
# cases/cases_ReassignBy.xml
#: radiogroup - REASSIGN_BY
msgid "Reassign By"
msgstr "Usuario"
# cases/cases_ReassignBy.xml?REASSIGN_BY-1
# cases/cases_ReassignBy.xml
#: radiogroup - REASSIGN_BY 1
msgid "[cases/cases_ReassignBy.xml?REASSIGN_BY-1]"
msgstr "Case"
# cases/cases_ReassignBy.xml?REASSIGN_BY-2
# cases/cases_ReassignBy.xml
#: radiogroup - REASSIGN_BY 2
msgid "[cases/cases_ReassignBy.xml?REASSIGN_BY-2]"
msgstr "User"
# cases/cases_ReassignBy.xml?REASSIGN_USER
# cases/cases_ReassignBy.xml
#: dropdown - REASSIGN_USER
msgid "[cases/cases_ReassignBy.xml?REASSIGN_USER] "
msgstr "- Seleccionar -"
# cases/cases_ReassignBy.xml?REASSIGN_USER-
# cases/cases_ReassignBy.xml
#: dropdown - REASSIGN_USER
msgid "[cases/cases_ReassignBy.xml?REASSIGN_USER-]"
msgstr "- Select -"
# cases/cases_ReassignShowInfo.xml?TITLE
# cases/cases_ReassignShowInfo.xml
#: subtitle - TITLE
@@ -47510,60 +47474,6 @@ msgstr "Guardar"
msgid "[users/users_EditRT.xml?BTN_CANCEL] Cancel"
msgstr "Cancelar"
# users/users_List.xml?USR_COMPLETENAME
# users/users_List.xml
#: text - USR_COMPLETENAME
msgid "[users/users_List.xml?USR_COMPLETENAME] Full Name"
msgstr "Nombre completo"
# users/users_List.xml?USR_USERNAME
# users/users_List.xml
#: text - USR_USERNAME
msgid "[users/users_List.xml?USR_USERNAME] Username"
msgstr "Nombre de Usuario"
# users/users_List.xml?USR_EMAIL
# users/users_List.xml
#: text - USR_EMAIL
msgid "E-Mail"
msgstr "Correo Electrónico"
# users/users_List.xml?USR_ROLE
# users/users_List.xml
#: text - USR_ROLE
msgid "[users/users_List.xml?USR_ROLE] Role"
msgstr "Rol"
# users/users_List.xml?USR_DUE_DATE
# users/users_List.xml
#: text - USR_DUE_DATE
msgid "[users/users_List.xml?USR_DUE_DATE] Due Date"
msgstr "Fecha de Vencimiento"
# users/users_List.xml?USR_EDIT
# users/users_List.xml
#: link - USR_EDIT
msgid "[users/users_List.xml?USR_EDIT] "
msgstr ""
# users/users_List.xml?USR_GROUP
# users/users_List.xml
#: link - USR_GROUP
msgid "[users/users_List.xml?USR_GROUP] "
msgstr ""
# users/users_List.xml?USR_AUTH
# users/users_List.xml
#: link - USR_AUTH
msgid "[users/users_List.xml?USR_AUTH] "
msgstr ""
# users/users_List.xml?USR_DELETE
# users/users_List.xml
#: link - USR_DELETE
msgid "[users/users_List.xml?USR_DELETE] "
msgstr ""
# users/users_New.xml?TITLE1
# users/users_New.xml
#: title - TITLE1
@@ -47780,12 +47690,6 @@ msgstr "Cancelar"
msgid "[users/users_NewOptions.xml?MNU] Back to list"
msgstr "Retornar a la lista"
# users/users_Options.xml?MNU_ADD
# users/users_Options.xml
#: link - MNU_ADD
msgid "[users/users_Options.xml?MNU_ADD] New"
msgstr "Nuevo"
# users/users_ReassignCases.xml?PROCESS
# users/users_ReassignCases.xml
#: text - PROCESS

View File

@@ -31727,42 +31727,6 @@ msgstr "Reassigned to"
msgid "BACK"
msgstr "BACK"
# cases/cases_ReassignBy.xml?title
# cases/cases_ReassignBy.xml
#: subtitle - title
msgid "<center>Reassignment of Cases</center>"
msgstr "<center>Reassignment of Cases</center>"
# cases/cases_ReassignBy.xml?REASSIGN_BY
# cases/cases_ReassignBy.xml
#: radiogroup - REASSIGN_BY
msgid "Reassign By"
msgstr "Reassign By"
# cases/cases_ReassignBy.xml?REASSIGN_BY-1
# cases/cases_ReassignBy.xml
#: radiogroup - REASSIGN_BY - 1
msgid "[cases/cases_ReassignBy.xml?REASSIGN_BY-1]"
msgstr "Case"
# cases/cases_ReassignBy.xml?REASSIGN_BY-2
# cases/cases_ReassignBy.xml
#: radiogroup - REASSIGN_BY - 2
msgid "[cases/cases_ReassignBy.xml?REASSIGN_BY-2]"
msgstr "User"
# cases/cases_ReassignBy.xml?REASSIGN_USER
# cases/cases_ReassignBy.xml
#: dropdown - REASSIGN_USER
msgid "[cases/cases_ReassignBy.xml?REASSIGN_USER] "
msgstr ""
# cases/cases_ReassignBy.xml?REASSIGN_USER-
# cases/cases_ReassignBy.xml
#: dropdown - REASSIGN_USER -
msgid "[cases/cases_ReassignBy.xml?REASSIGN_USER-]"
msgstr "- Select -"
# cases/cases_ReassignShowInfo.xml?TITLE
# cases/cases_ReassignShowInfo.xml
#: subtitle - TITLE
@@ -48531,60 +48495,6 @@ msgstr "Save"
msgid "[users/users_EditRT.xml?BTN_CANCEL] Cancel"
msgstr "Cancel"
# users/users_List.xml?USR_COMPLETENAME
# users/users_List.xml
#: text - USR_COMPLETENAME
msgid "[users/users_List.xml?USR_COMPLETENAME] Full Name"
msgstr "Full Name"
# users/users_List.xml?USR_USERNAME
# users/users_List.xml
#: text - USR_USERNAME
msgid "[users/users_List.xml?USR_USERNAME] Username"
msgstr "Username"
# users/users_List.xml?USR_EMAIL
# users/users_List.xml
#: text - USR_EMAIL
msgid "E-Mail"
msgstr "E-Mail"
# users/users_List.xml?USR_ROLE
# users/users_List.xml
#: text - USR_ROLE
msgid "[users/users_List.xml?USR_ROLE] Role"
msgstr "Role"
# users/users_List.xml?USR_DUE_DATE
# users/users_List.xml
#: text - USR_DUE_DATE
msgid "[users/users_List.xml?USR_DUE_DATE] Due Date"
msgstr "Due Date"
# users/users_List.xml?USR_EDIT
# users/users_List.xml
#: link - USR_EDIT
msgid "[users/users_List.xml?USR_EDIT] "
msgstr ""
# users/users_List.xml?USR_GROUP
# users/users_List.xml
#: link - USR_GROUP
msgid "[users/users_List.xml?USR_GROUP] "
msgstr ""
# users/users_List.xml?USR_AUTH
# users/users_List.xml
#: link - USR_AUTH
msgid "[users/users_List.xml?USR_AUTH] "
msgstr ""
# users/users_List.xml?USR_DELETE
# users/users_List.xml
#: link - USR_DELETE
msgid "[users/users_List.xml?USR_DELETE] "
msgstr ""
# users/users_New.xml?TITLE1
# users/users_New.xml
#: title - TITLE1
@@ -48801,12 +48711,6 @@ msgstr "Cancel"
msgid "[users/users_NewOptions.xml?MNU] Back to list"
msgstr "Back to list"
# users/users_Options.xml?MNU_ADD
# users/users_Options.xml
#: link - MNU_ADD
msgid "[users/users_Options.xml?MNU_ADD] New"
msgstr "New"
# users/users_ReassignCases.xml?PROCESS
# users/users_ReassignCases.xml
#: text - PROCESS

View File

@@ -1,140 +0,0 @@
/**
* Reassign ByUser routines
* Author Erik Amaru Ortiz <erik@colosa.com>
*/
var reassignPanel;
function toReassignPanel(){
if( checks_selected_ids.length == 0 ){
new leimnud.module.app.alert().make({label: G_STRINGS.ID_REASSIGN_BYUSER});
return 0;
}
/*oPanel = new leimnud.module.panel();
oPanel.options = {
size : { w:1000, h:600 },
position: { x:0,y:0,center:true },
title : G_STRINGS.ID_MSG_RESSIGN_BYUSER_PANEL,
statusBar: false,
control : {resize:false,roll:false,drag:true},
fx : { modal:true, opacity:true, blinkToFront:false, fadeIn:false, drag:true}
};
oPanel.events = {
remove: function() {
delete(oPanel);
//resetChecks();
//window.location = 'cases_ReassignByUser?REASSIGN_USER=' + getField('REASSIGN_USER').value;
}.extend(this)
};*/
//oPanel.make();
//oPanel.loader.show();
var USER_SELETED = getField('REASSIGN_USER').value;
var oRPC = new leimnud.module.rpc.xmlhttp({
url : 'cases_Ajax',
args: 'action=reassignByUserList&APP_UIDS='+checks_selected_ids+'&FROM_USR_ID='+USER_SELETED
});
oRPC.callback = function(rpc) {
//oPanel.loader.hide();
//var scs=rpc.xmlhttp.responseText.extractScript();
//oPanel.addContent(rpc.xmlhttp.responseText);
//scs.evalScript();
document.getElementById("publisherContent[0]").style.display = 'none';
document.getElementById("publisherContent[1]").style.display = 'none';
document.getElementById("publisherContent[10]").style.display = 'block';
document.getElementById("publisherContent[10]").innerHTML = rpc.xmlhttp.responseText;
}.extend(this);
oRPC.make();
//reassignPanel = oPanel;
}
function toReassign(){
var selects = document.getElementsByName('form[USERS]');
var USER_SELETED = getField('REASSIGN_USER').value;
var items = '';
for(i=0; i<selects.length; i++){
if( selects[i].value != "0" ){
if( items != '') items += ',';
id = selects[i].id;
id = id.trim();
items += selects[i].id.substring(5, selects[i].id.length-1) +'|'+ selects[i].value;
}
}
if( items.trim() == '' ){
new leimnud.module.app.alert().make({label: G_STRINGS.ID_REASSIGN_BYUSER});
return 0;
}
new leimnud.module.app.confirm().make({
label:G_STRINGS.ID_REASSIGN_BYUSER_CONFIRM,
action:function(){
var oRPC = new leimnud.module.rpc.xmlhttp({
url : 'cases_Ajax',
args: 'action=reassignByUser&items='+items+'&USR_UID='+USER_SELETED
});
//reassignPanel.loader.show();
oRPC.callback = function(rpc) {
//reassignPanel.loader.hide();
//reassignPanel.clearContent();
/*reassignPanel.events = {
remove: function() {
delete(oPanel);
window.location = 'cases_ReassignByUser?REASSIGN_USER=' + getField('REASSIGN_USER').value;
}.extend(this)
};*/
var scs=rpc.xmlhttp.responseText.extractScript();
//reassignPanel.addContent(rpc.xmlhttp.responseText);
document.getElementById("publisherContent[10]").innerHTML = rpc.xmlhttp.responseText;
scs.evalScript();
}.extend(this);
oRPC.make();
}.extend(this)
});
}
function cancelReassign(){
document.getElementById("publisherContent[0]").style.display = 'block';
document.getElementById("publisherContent[1]").style.display = 'block';
document.getElementById("publisherContent[10]").style.display = 'none';
document.getElementById("publisherContent[10]").innerHTML = '';
}
function resetChecks(){
checks_selected_ids.length = 0;
}
function WindowSize() {
var wSize = [0, 0];
if (typeof window.innerWidth != 'undefined')
{
wSize = [
window.innerWidth,
window.innerHeight
];
}
else if (typeof document.documentElement != 'undefined'
&& typeof document.documentElement.clientWidth !=
'undefined' && document.documentElement.clientWidth != 0)
{
wSize = [
document.documentElement.clientWidth,
document.documentElement.clientHeight
];
}
else {
wSize = [
document.getElementsByTagName('body')[0].clientWidth,
document.getElementsByTagName('body')[0].clientHeight
];
}
return wSize;
}

View File

@@ -888,42 +888,6 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-reassigByUser2', 'cases/cases_ToReassignByUserList2', $oCriteria);
G::RenderPage('publish', 'raw');
break;
/* @Author Erik Amaru Ortiz <erik@colosa.com> */
case 'reassignByUser':
$oCases = new Cases();
$aCases = array();
if (isset($_POST['items']) && trim($_POST['items']) != '') {
$sItems = $_POST['items'];
$aItems = explode(',', $sItems);
$FROM_USR_UID = $_POST['USR_UID'];
foreach ($aItems as $item) {
list($APP_UID, $USR_UID) = explode('|', $item);
$aCase = $oCases->loadCaseInCurrentDelegation($APP_UID, true);
$oCase->reassignCase($aCase['APP_UID'], $aCase['DEL_INDEX'], $FROM_USR_UID, $USR_UID);
array_push($aCases, $aCase);
}
//G::pr($aCases);
//require_once 'classes/model/Users.php';
$oUser = new Users();
$sText = '';
foreach ($aCases as $aCase) {
$aCaseUpdated = $oCases->loadCaseInCurrentDelegation($aCase['APP_UID'], true);
$aUser = $oUser->load($aCaseUpdated['USR_UID']);
$sText .= $aCaseUpdated['APP_PRO_TITLE'] . ' - ' . ' Case: ' . $aCaseUpdated['APP_NUMBER'] . '# (' . $aCaseUpdated['APP_TAS_TITLE'] . ') <b> => Reassigned to => </b> <font color="blue">' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' [' . $aUser['USR_USERNAME'] . ']' . '</font><br />';
}
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $sText;
$aMessage['URL'] = 'cases_ReassignByUser?REASSIGN_USER=' . $_POST['USR_UID'];
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage);
G::RenderPage('publish', 'raw');
}
break;
case "uploadInputDocument":
//krumo($_POST);
$G_PUBLISH = new Publisher();

View File

@@ -1,150 +0,0 @@
<?php
/**
* cases_ReassignByUser.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/**
* Reassign ByUser routines
* Author Erik Amaru Ortiz <erik@colosa.com>
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_REASSIGNCASE')) {
case - 2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case - 1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
if (! isset($_GET['REASSIGN_USER'])) {
$_GET['REASSIGN_USER'] = '';
}
$_GET['REASSIGN_BY'] = 2;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
//////////////////
///SELECT USR_UID, CONCAT(USR_FIRSTNAME, ' ', USR_LASTNAME, ' (', USR_USERNAME, ')') AS USER_FULLNAME FROM USERS WHERE USR_STATUS <> 'CLOSED'//////
require_once 'classes/model/Users.php';
$oCriteria = new Criteria();
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
$oCriteria->add(UsersPeer::USR_STATUS, '', Criteria::NOT_EQUAL);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
///////////////////////
$oConf = new Configurations();
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
$defaultOption = isset($oConf->aConfig['format']) ? $oConf->aConfig['format'] : '';
$aUserInfo = array();
$aUserInfo[] = array('USR_UID' => 'char','USER_FULLNAME' => 'char'
);
while ($oDataset->next()) {
$aRow1 = $oDataset->getRow();
$infoUser = G::getFormatUserList($defaultOption, $aRow1);
$aUserInfo[] = array('USR_UID' => $aRow1['USR_UID'],'USER_FULLNAME' => $infoUser
);
}
global $_DBArray;
$_DBArray['aUserInfo'] = $aUserInfo;
$_SESSION['_DBArray'] = $_DBArray;
//////////////////
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ReassignBy', '', $_GET);
$sUserToReassign = trim($_GET['REASSIGN_USER']);
if ($_GET['REASSIGN_USER'] != '') {
$oTasks = new Tasks();
$oGroups = new Groups();
$oUser = new Users();
$oAppCache = new AppCacheView();
$oCriteriaToDo = $oAppCache->getToDoListCriteria($sUserToReassign);
$oCriteriaDraft = $oAppCache->getDraftListCriteria($sUserToReassign);
$aCasesList = array();
$oDataset = ApplicationPeer::doSelectRS($oCriteriaToDo);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
array_push($aCasesList, $oDataset->getRow());
}
$oDataset = ApplicationPeer::doSelectRS($oCriteriaDraft);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
array_push($aCasesList, $oDataset->getRow());
}
$filedNames = array("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER"
);
$aCasesList = array_merge(array($filedNames
), $aCasesList);
// G::pr($aCasesList); die;
require_once('classes/class.xmlfield_InputPM.php');
global $_DBArray;
$_DBArray['reassign_byuser'] = $aCasesList;
$_SESSION['_DBArray'] = $_DBArray;
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('reassign_byuser');
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/cases/reassignByUser.js');
$G_PUBLISH->ROWS_PER_PAGE = 12;
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, array('FROM_USR_UID' => $sUserToReassign
));
}
G::RenderPage('publish', 'blank');
} catch (Exception $oException) {
$token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)));
die;
}
?>
<div id="publisherContent[10]" style="display: none"></div>
<?php

View File

@@ -1,75 +0,0 @@
<?php
/**
* cases_UsersReassign.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_REASSIGNCASE' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
$oCase = new Cases();
$aCases = array ();
$aUsers = array ();
if (isset( $_POST['USERS'] ) && is_array( $_POST['USERS'] )) {
foreach ($_POST['USERS'] as $sKey => $sUser) {
if ($sUser != '') {
$oCase->reassignCase( $_POST['APPLICATIONS'][$sKey], $_POST['INDEXES'][$sKey], $_POST['USR_UID'], $sUser );
$aCases[] = $_POST['APPLICATIONS'][$sKey];
$aUsers[] = $sUser;
}
}
}
$oCase = new Cases();
require_once 'classes/model/Users.php';
$oUser = new Users();
$sText = '';
foreach ($aCases as $sKey => $sCase) {
$aCase = $oCase->loadCase( $sCase );
$aUser = $oUser->load( $aUsers[$sKey] );
$sText .= '(' . $aCase['APP_NUMBER'] . ') ' . $aCase['TITLE'] . ' => ' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')' . '<br />';
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $sText;
$aMessage['URL'] = 'cases_ReassignByUser?REASSIGN_USER=' . $_POST['USR_UID'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage );
G::RenderPage( 'publish' );
} catch (Exception $oException) {
$token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
}

View File

@@ -1,41 +0,0 @@
<form name="frmReassign" id="frmReassign" method="POST" action="cases_UsersReassign">
<div class="borderForm" style="width:; padding-left:0; padding-right:0; border-width:1;">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="pagedTableDefault" style="height:100%;" >
<table width="95%" align="center" cellpadding="2" cellspacing="0" border="0" class="pagedTable">
<tr>
<td class="pagedTableHeader"><img src="/js/maborak/core/images/separatorTable.gif" style=""/></td><td width="5%" class="pagedTableHeader">{ID_NUMBER}</td>
<td class="pagedTableHeader"><img src="/js/maborak/core/images/separatorTable.gif" style=""/></td><td width="25%" class="pagedTableHeader">{ID_CASE}</td>
<td class="pagedTableHeader"><img src="/js/maborak/core/images/separatorTable.gif" style=""/></td><td width="20%" class="pagedTableHeader">{ID_TASK}</td>
<td class="pagedTableHeader"><img src="/js/maborak/core/images/separatorTable.gif" style=""/></td><td width="20%" class="pagedTableHeader">{ID_PROCESS}</td>
<td class="pagedTableHeader"><img src="/js/maborak/core/images/separatorTable.gif" style=""/></td><td width="5%" class="pagedTableHeader">{ID_STATUS}</td>
<td class="pagedTableHeader"><img src="/js/maborak/core/images/separatorTable.gif" style=""/></td><td width="25%" class="pagedTableHeader">{ID_REASSIGN_TO}</td>
</tr>
<!-- START BLOCK : cases -->
<tr class="Row2" onmouseout="setRowClass(this, 'Row2');" onmouseover="setRowClass(this, 'RowPointer');">
<td /><td>{APP_NUMBER}</td>
<td /><td>{APP_TITLE}</td>
<td /><td>{APP_TAS_TITLE}</td>
<td /><td>{APP_PRO_TITLE}</td>
<td /><td>{ID_STATUS}</td>
<td /><td>
<input type="hidden" name="APPLICATIONS[]" id="APPLICATIONS[]" value="{APP_UID}" />
<input type="hidden" name="INDEXES[]" id="INDEXES[]" value="{DEL_INDEX}" />
<select name="USERS[]" id="USERS[]"><option value=""> - {ID_NO_REASSIGN} - </option>
<!-- START BLOCK : users -->
<option value="{USR_UID}">{USR_FULLNAME}</option>
<!-- END BLOCK : users -->
</select>
</td>
</tr>
<!-- END BLOCK : cases -->
<tr height="50">
<td colspan="12" align="center">
<input type="hidden" name="USR_UID" id="USR_UID" value="{USR_UID}" />
<input type="submit" name="btnReassign" id="btnReassign" value="{ID_REASSIGN}" class="module_app_button___gray" />
</td>
</tr>
</table>
</div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</form>

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlform" name="cases_ReassignBy.xml" width="600" enabletemplate="1" mode="edit">
<title type="subtitle" enableHTML="1">
<en><![CDATA[<center>Reassignment of Cases</center>]]></en>
</title>
<REASSIGN_BY type="radiogroup" required="0" defaultvalue="1" mode="edit">
<en><![CDATA[Reassign By]]><option name="1"><![CDATA[Case]]></option><option name="2"><![CDATA[User]]></option></en>
</REASSIGN_BY>
<REASSIGN_USER type="dropdown" required="0" readonly="0" mode="edit" sqlconnection="dbarray"><![CDATA[
SELECT * FROM aUserInfo
]]><en><![CDATA[]]><option name=""><![CDATA[- Select -]]></option></en></REASSIGN_USER>
<JS type="javascript"><![CDATA[
var bFlag = false;
var client = getBrowserClient();
var dynaformOnload = function() {
if (!bFlag) {
if( client.browser == 'msie'){
document.getElementById('form[REASSIGN_BY][1]').onclick= function() {
if (this.checked) {
if (window.location.href.indexOf('cases_List?l=to_reassign') == -1) {
window.location = 'cases_List?l=to_reassign';
}
}
};
document.getElementById('form[REASSIGN_BY][2]').onclick= function() {
if (document.getElementById('form[REASSIGN_BY][2]').checked) {
if (window.location.href.indexOf('cases_ReassignByUser') == -1) {
window.location = 'cases_ReassignByUser';
}
}
};
leimnud.event.add(getField('REASSIGN_USER'), 'change', function() {
window.location = 'cases_ReassignByUser?REASSIGN_USER=' + getField('REASSIGN_USER').value;
});
} else { //for other firefox, safari, etc..
leimnud.event.add(getField('REASSIGN_BY][1'), 'click', function() {
if (this.checked) {
if (window.location.href.indexOf('cases_List?l=to_reassign') == -1) {
window.location = 'cases_List?l=to_reassign';
}
}
});
leimnud.event.add(getField('REASSIGN_BY][2'), 'click', function() {
if (this.checked) {
if (window.location.href.indexOf('cases_ReassignByUser') == -1) {
window.location = 'cases_ReassignByUser';
}
}
});
leimnud.event.add(getField('REASSIGN_USER'), 'change', function() {
window.location = 'cases_ReassignByUser?REASSIGN_USER=' + this.value;
});
}
bFlag = true;
}
};
if (getField('REASSIGN_BY][2').checked){
//showRowById('REASSIGN_USER');
document.getElementById('form[REASSIGN_USER]').style.display = 'block';
} else {
//hideRowById('REASSIGN_USER');
document.getElementById('form[REASSIGN_USER]').style.display = 'none';
}
]]></JS>
</dynaForm>

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="pagetable" menu="users/users_Options" searchBy="USR_USERNAME | USR_LASTNAME | USR_FIRSTNAME | USR_EMAIL">
<USR_UID type="private" showInTable="0"/>
<USR_COMPLETENAME type="text" titlealign="left" align="left" colWidth="200">
<en><![CDATA[Full Name]]></en>
</USR_COMPLETENAME>
<USR_USERNAME type="text" titlealign="left" align="left" colWidth="120">
<en><![CDATA[Username]]></en>
</USR_USERNAME>
<USR_EMAIL type="text" titlealign="left" align="left" colWidth="190">
<en><![CDATA[E-Mail]]></en>
</USR_EMAIL>
<USR_ROLE type="text" titlealign="left" align="left" colWidth="180">
<en><![CDATA[Role]]></en>
</USR_ROLE>
<USR_DUE_DATE type="text" titlealign="left" align="left" colWidth="65">
<en><![CDATA[Due Date]]></en>
</USR_DUE_DATE>
<USR_EDIT type="link" colWidth="50" value="@#USR_EDIT" link="users_Edit?USR_UID=@#USR_UID">
<en><![CDATA[]]></en>
</USR_EDIT>
<USR_GROUP type="link" colWidth="25" value="@G::LoadTranslation(ID_VIEW_USER_GROUP)" link="#" onclick="viewUserGroups('@#USR_UID');return false;">
<en><![CDATA[]]></en>
</USR_GROUP>
<USR_AUTH type="link" colWidth="25" value="@#USR_AUTH" link="users_AuthSource?USR_UID=@#USR_UID">
<en><![CDATA[]]></en>
</USR_AUTH>
<!--USR_REASSIGN type="link" colWidth="100" value="@#USR_REASSIGN" link="#" onclick="reassignCases2(&#039;@#USR_UID&#039;);return false;">
<en/>
</USR_REASSIGN-->
<USR_DELETE type="link" colWidth="25" value="@#USR_DELETE" link="#" onclick="deleteUser('@#USR_UID');return false;">
<en><![CDATA[]]></en>
</USR_DELETE>
</dynaForm>

View File

@@ -1,200 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlmenu">
<MNU_ADD type="link" value="" link="#" onclick="window.location = 'users_New';return false;" colAlign="left" colWidth="35">
<en><![CDATA[New]]></en>
</MNU_ADD>
<PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<SEARCH_FILTER_FORM type="private"/>
<CONFIRM type="private"/>
<JS type="javascript"><![CDATA[
var simpleUserDelete = function(sUser) {
new leimnud.module.app.confirm().make({
label:'@#CONFIRM',
action:function() {
window.location = 'users_Delete?USR_UID=' + sUser;
}.extend(this)
});
};
var panel;
var gUSER_UID;
var deleteUser=function(sUser){
if (sUser == '00000000000000000000000000000001')
{
new leimnud.module.app.alert().make({
label: "@G::LoadTranslation(ID_CANNOT_DELETE_ADMIN_USER)"
});
}
else
{
gUSER_UID = sUser;
panel =new leimnud.module.panel();
panel.options={
size :{w:450,h:250},
position:{x:50,y:50,center:true},
statusBarButtons:[
{value:'@G::LoadTranslation(ID_DELETE)'},
{value: G_STRINGS.CANCEL}
],
title :G_STRINGS.ID_PROSESSESCASE,
control :{close:true,resize:false},fx:{modal:true},
statusBar:false,
fx :{shadow:true,modal:true}
};
panel.make();
panel.elements.statusBarButtons[0].onmouseup=function(){
var todoCount = parseInt(getField('TO_DO').value);
var draftCount = parseInt(getField('DRAFT').value);
var cancelledCount = parseInt(getField('CANCELLED').value);
var completedCount = parseInt(getField('COMPLETED').value);
if(todoCount== 0 && draftCount==0){
if(cancelledCount== 0 && completedCount==0){
location.href = "users_Delete?USR_UID="+gUSER_UID;
} else {
new leimnud.module.app.confirm().make({
label:G_STRINGS.USERS_DELETE_WITH_HISTORY,
width:350,
height:130,
action:function(){
location.href = "users_Delete?USR_UID="+gUSER_UID;
}.extend(this)
});
}
} else {
new leimnud.module.app.confirm().make({
label:G_STRINGS.USERS_REASSIGN,
width:350,
height:135,
action:function(){
/*location.href = "../cases/cases_ReassignByUser";*/
userReassing(gUSER_UID);
}.extend(this)
});
}
};
panel.elements.statusBarButtons[1].onmouseup=panel.remove;
panel.loader.show();
var r = new leimnud.module.rpc.xmlhttp({
url:"users_DeleteAssign.php",
method:"GET",
args:"USR_UID=" + sUser
});
r.callback=function(rpc)
{
panel.loader.hide();
panel.addContent(rpc.xmlhttp.responseText);
};
r.make();
}
}
function viewUserGroups(sUserUID){
popupWindow('' , 'users_Groups?sUserUID='+sUserUID , 400 , 330 );
/*refreshTree();*/
};
function showUserGroups(sUserUID){
var oRPC = new leimnud.module.rpc.xmlhttp({
url : '../users/users_Ajax',
async : false,
method: 'POST',
args : 'function=showUserGroups'+ '&sUserUID=' + sUserUID
});
oRPC.make();
currentPopupWindow.clearContent();
currentPopupWindow.addContent(oRPC.xmlhttp.responseText);
};
function deleteGroup(sGroup, sUser){
new leimnud.module.app.confirm().make({
label:G_STRINGS.ID_MSG_CONFIRM_REMOVE_USERGROUP,
action:function(){
var oRPC = new leimnud.module.rpc.xmlhttp({
url : '../users/users_Ajax',
async : false,
method: 'POST',
args : 'function=deleteGroup&GRP_UID=' + sGroup + '&USR_UID=' + sUser
});
oRPC.make();
currentPopupWindow.clearContent();
currentPopupWindow.addContent(oRPC.xmlhttp.responseText);
}.extend(this)
});
};
function showUserGroupInterface(sUserUID){
var oRPC = new leimnud.module.rpc.xmlhttp({
url : '../users/users_Ajax',
async : false,
method: 'POST',
args : 'function=showUserGroupInterface'+ '&sUserUID=' + sUserUID
});
oRPC.make();
currentPopupWindow.clearContent();
currentPopupWindow.addContent(oRPC.xmlhttp.responseText);
//currentPopupWindow.remove();
};
function saveUserGroup(sGroup, sUser){
var oRPC = new leimnud.module.rpc.xmlhttp({
url : '../users/users_Ajax',
async : false,
method: 'POST',
args : 'function=assignUserToGroup&GRP_UID=' + sGroup + '&USR_UID=' + sUser
});
oRPC.make();
currentPopupWindow.clearContent();
currentPopupWindow.addContent(oRPC.xmlhttp.responseText);
setTimeout('showUserGroups(\''+sUser+'\')',1500);
}
var reassignCases = function(sUser) {
window.location = 'users_ReassignCases?sUser=' + sUser;
};
var reassignCases2 = function(USR_UID) {
popupWindow('' , 'users_ReassignCases?USR_UID=' + USR_UID + '&iStep=1' , 500, 350);
};
function userReassing(USR_UID){
var panel =new leimnud.module.panel();
var width = 1000;
var height= 700;
panel.options={
size :{w:width, h:height},
position:{x:50,y:50,center:true},
statusBarButtons:[{value: G_STRINGS.CANCEL}],
title :G_STRINGS.ID_REASSIGNMENT,
control :{close:true,resize:false},fx:{modal:true},
statusBar:false,
fx :{shadow:true,modal:true}
};
panel.make();
ifrm = document.createElement("iframe");
ifrm.setAttribute("name", "userReassing");
ifrm.setAttribute("id","userReassing");
ifrm.setAttribute("src", "../cases/cases_ReassignByUser?REASSIGN_USER="+USR_UID);
ifrm.style.width = "100%";
ifrm.style.height = "99%";
ifrm.style.border = "0";
panel.addContent(ifrm);
panel.elements.statusBarButtons[0].onmouseup=function(){
panel.remove();
};
}
]]></JS>
</dynaForm>