Merge branch '2.0-dev' of git.colosa.net:/processmaker into 2.0-dev

This commit is contained in:
Julio Cesar Laura
2011-11-10 12:35:36 -04:00
3 changed files with 26 additions and 9 deletions

View File

@@ -288,13 +288,14 @@ $caseStep->getStepPosition());
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase');
else
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase', 'hide'=>'hiden');
}
} else {
$options[] = Array('text'=>G::LoadTranslation('ID_UNPAUSE'), 'fn'=>'unpauseCase');
}
if($RBAC->userCanAccess('PM_REASSIGNCASE')==1) {
$options[] = Array('text'=>G::LoadTranslation('ID_REASSIGN'), 'fn'=>'getUsersToReassign');
}
}
else {
$options[] = Array('text'=>G::LoadTranslation('ID_UNPAUSE'), 'fn'=>'unpauseCase');
}
if($RBAC->userCanAccess('PM_REASSIGNCASE')==1) {
$options[] = Array('text'=>G::LoadTranslation('ID_REASSIGN'), 'fn'=>'getUsersToReassign');
}
break;
case 'CANCELLED':

View File

@@ -29,8 +29,24 @@
*/
if (!isset($_GET['APP_UID']) || !isset($_GET['DEL_INDEX'])) {
throw new Exception("Application ID or Delegation Index is missing!. The System can't open the case.");
if (isset($_GET['APP_NUMBER'])) {
G::LoadClass('case');
$oCase = new Cases();
$_GET['APP_UID'] = $oCase->getApplicationUIDByNumber($_GET['APP_NUMBER']);
$_GET['DEL_INDEX'] = $oCase->getCurrentDelegation($_GET['APP_UID'], $_SESSION['USER_LOGGED']);
if( is_null($_GET['APP_UID']) ) {
throw new Exception(G::LoadTranslation('ID_CASE_DOES_NOT_EXISTS'));
}
if( is_null($_GET['DEL_INDEX']) ) {
throw new Exception(G::LoadTranslation('ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER'));
}
}
else {
throw new Exception("Application ID or Delegation Index is missing!. The System can't open the case.");
}
}
require_once ("classes/model/Step.php");
G::LoadClass("configuration");
G::LoadClass("case");

View File

@@ -101,9 +101,9 @@ function openCase(){
}
function jumpToCase(appNumber){
params = 'APP_NUMBER=' + appNumber;
params = 'APP_NUMBER=' + appNumber;
params += '&action=jump';
requestFile = '../cases/cases_Open';
requestFile = '../cases/open';
redirect(requestFile + '?' + params);
}