Merged in release/3.2.3 (pull request #6488)

HOR-4600

Approved-by: Paula Quispe <paula.quispe@processmaker.com>
Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2018-05-29 15:20:50 +00:00
committed by Julio Cesar Laura Avendaño
19 changed files with 55 additions and 28 deletions

View File

@@ -252,6 +252,11 @@ class PmDynaform
$dtFields = $json->queryInputData;
} else {
$dtFields = $this->getValuesDependentFields($json);
foreach ($dtFields as $keyF => $valueF) {
if (isset($this->fields["APP_DATA"][$keyF])) {
$dtFields[$keyF] = $this->fields["APP_DATA"][$keyF];
}
}
}
$sql = G::replaceDataField($json->sql, $dtFields);
if ($value === "suggest") {

View File

@@ -2304,6 +2304,7 @@ class WsBase
);
//Execute triggers after routing
$appFields = $oCase->loadCase($caseId);
$varTriggers .= $this->executeTriggerFromDerivate($caseId, $appFields["APP_DATA"], $appdel['TAS_UID'], 'ASSIGN_TASK', -2, 'AFTER', "-= After Derivation =-");
$sFromName = "";

View File

@@ -252,6 +252,11 @@ if ($timeZoneFailed) {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login' . PATH_SEP . 'TimeZoneAlert', '', $arrayData, SYS_URI . 'login/authentication.php');
G::RenderPage('publish');
// Destroy a significant value in session
global $G_FORM;
unset($_SESSION[$G_FORM->id]['USR_PASSWORD']);
exit(0);
}
/*----------------------------------********---------------------------------*/

View File

@@ -36,6 +36,8 @@ if (!isset($_POST)) {
}
if (isset($_SESSION['sysLogin'])) {
$_POST['form'] = $_SESSION['sysLogin'];
// Destroy variables already assigned to the global variable $_POST
unset($_SESSION['sysLogin']);
}
require_once 'authentication.php';

View File

@@ -398,3 +398,6 @@ td.x-date-mp-sep {
right: 0x !important;
}
#startCaseTreePanel span:after, font:after {
content: "\200E";
}

View File

@@ -28,7 +28,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/
.panel_headerBar___processmaker{background:url("/images/ext/gray/toolbar/bg.gif") #F0F0F0 !important}
.button_menu_ext{height:18px !important;}
.button_menu_ext{padding-left:20px !important;height:18px !important;}
.button_large_ext{padding-left:20px !important;height:32px !important;}
.button_toolbar{padding-left:18px !important;height:18px !important;font-size:15px;cursor:pointer;margin:0 2px 1px 3px;line-height:25px}
.ss_accept{background-position:0 0 !important}

View File

@@ -672,6 +672,6 @@ td.x-date-mp-sep {
.ext-ie .x-menu-item-checked .x-menu-group-item .x-menu-item-icon {
right: 0x !important;
}
span:after, font:after {
#startCaseTreePanel span:after, font:after {
content: "\200E";
}

View File

@@ -220,6 +220,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/
background: url("/skins/neoclassic/images/ext/gray/toolbar/bg.gif") #f0f0f0 !important;
}
.button_menu_ext {
padding-left: 20px !important;
height: 18px !important;
}
.button_large_ext {

View File

@@ -417,3 +417,6 @@ td.x-date-mp-sep {
right: 0x !important;
}
#startCaseTreePanel span:after, font:after {
content: "\200E";
}

View File

@@ -397,3 +397,6 @@ td.x-date-mp-sep {
right: 0x !important;
}
#startCaseTreePanel span:after, font:after {
content: "\200E";
}

View File

@@ -28,7 +28,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/
.panel_headerBar___processmaker{background:url("/images/ext/gray/toolbar/bg.gif") #F0F0F0 !important}
.button_menu_ext{height:18px !important;}
.button_menu_ext{padding-left:20px !important;height:18px !important;}
.button_large_ext{padding-left:20px !important;height:32px !important;}
.button_toolbar{padding-left:18px !important;height:18px !important;font-size:15px;cursor:pointer;margin:0 2px 1px 3px;line-height:25px}
.ss_accept{background-position:0 0 !important}

View File

@@ -399,3 +399,6 @@ td.x-date-mp-sep {
right: 0x !important;
}
#startCaseTreePanel span:after, font:after {
content: "\200E";
}

View File

@@ -28,7 +28,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/
.panel_headerBar___processmaker{background:url("/images/ext/gray/toolbar/bg.gif") #F0F0F0 !important}
.button_menu_ext{height:18px !important;}
.button_menu_ext{padding-left:20px !important;height:18px !important;}
.button_large_ext{padding-left:20px !important;height:32px !important;}
.button_toolbar{padding-left:18px !important;height:18px !important;font-size:15px;cursor:pointer;margin:0 2px 1px 3px;line-height:25px}
.ss_accept{background-position:0 0 !important}

View File

@@ -6,6 +6,7 @@ use ProcessMaker\BusinessModel\Lists;
use G;
use Criteria;
use UsersPeer;
use AppDelegation;
use AppDelegationPeer;
use AppDelayPeer;
use ProcessMaker\Core\System;
@@ -1076,28 +1077,30 @@ class Light
}
/**
* claim case
* Claim case
*
* @param $userUid
* @param $Fields
* @param $type
* @param string $userUid
* @param string $appUid
* @param integer $delIndex
*
* @return array
* @throws Exception
*/
public function claimCaseUser($userUid, $sAppUid)
public function claimCaseUser($userUid, $appUid, $delIndex = null)
{
$response = array("status" => "fail");
$oCase = new Cases();
$iDelIndex = $oCase->getCurrentDelegation($sAppUid, '', true);
$response = ['status' => 'fail'];
$case = new Cases();
$appDelegation = new AppDelegation();
if (empty($delIndex)) {
$delIndex = $case->getCurrentDelegation($appUid, '', true);
}
$oAppDelegation = new \AppDelegation();
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
$delegation = $appDelegation->Load($appUid, $delIndex);
//if there are no user in the delegation row, this case is still in selfservice
if ($aDelegation['USR_UID'] == "") {
$oCase->setCatchUser($sAppUid, $iDelIndex, $userUid);
$response = array("status" => "ok");
} else {
//G::SendMessageText( G::LoadTranslation( 'ID_CASE_ALREADY_DERIVATED' ), 'error' );
if (empty($delegation['USR_UID'])) {
$case->setCatchUser($appUid, $delIndex, $userUid);
$response['status'] = 'ok';
}
return $response;

View File

@@ -1490,12 +1490,12 @@ class Light extends Api
* @access protected
* @class AccessControl {@permission PM_CASES}
*/
public function claimCaseUser($app_uid)
public function claimCaseUser($app_uid, $del_index = null)
{
try {
$userUid = $this->getUserId();
$oMobile = new BusinessModelLight();
$response = $oMobile->claimCaseUser($userUid, $app_uid);
$mobile = new BusinessModelLight();
$response = $mobile->claimCaseUser($userUid, $app_uid, $del_index);
} catch (Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}

View File

@@ -328,7 +328,7 @@ Ext.onReady(function() {
xtype : 'button',
id : 'starCaseButton',
disabled : true,
iconCls : "ICON_CASES_START_CASE",
iconCls : "button_menu_ext ICON_CASES_START_CASE",
text : TRANSLATIONS.ID_TITLE_START_CASE,
autoWidth : true,
handler : function() {

View File

@@ -389,7 +389,7 @@ Ext.onReady(function(){
id: 'deatachAction',
disabled: true,
text: _('ID_OPEN_IN_A_NEW_WINDOW'),
iconCls: 'ss_sprite ss_application_form',
iconCls: 'button_menu_ext ss_sprite ss_application_form',
handler: function(){
if( Ext.getCmp('debugPanelTabs').getActiveTab().id === 'debugVariables' ){
var i,

View File

@@ -438,7 +438,7 @@ Ext.onReady(function(){
pressed: false,
enableToggle:true,
text: '&nbsp;&nbsp;'+_('ID_CASES_NOTES'),
iconCls: 'ICON_CASES_NOTES',
iconCls: 'button_menu_ext ICON_CASES_NOTES',
tooltip: {
title: _('ID_CASES_NOTES'),
text:_('ID_SHOW_CASES_NOTES')

View File

@@ -703,7 +703,6 @@ Ext.onReady(function(){
var arrayContextMenuOption = [
{
text: _("ID_EDIT"),
iconCls: "button_menu_ext",
icon: "/images/pencil.png",
handler: editProcess
},
@@ -720,7 +719,6 @@ Ext.onReady(function(){
},
{
text: _("ID_DELETE"),
iconCls: "button_menu_ext",
icon: "/images/delete_16.png",
handler: deleteProcess
},