Merge remote branch 'upstream/master'
This commit is contained in:
@@ -482,10 +482,12 @@ class Applications
|
|||||||
$aRow["APP_TAS_TITLE"] = $aRow["APPCVCR_APP_TAS_TITLE"];
|
$aRow["APP_TAS_TITLE"] = $aRow["APPCVCR_APP_TAS_TITLE"];
|
||||||
|
|
||||||
//Current user
|
//Current user
|
||||||
$aRow["USR_UID"] = $aRow["USRCR_USR_UID"];
|
if ($action != "to_reassign" ) {
|
||||||
$aRow["USR_FIRSTNAME"] = $aRow["USRCR_USR_FIRSTNAME"];
|
$aRow["USR_UID"] = $aRow["USRCR_USR_UID"];
|
||||||
$aRow["USR_LASTNAME"] = $aRow["USRCR_USR_LASTNAME"];
|
$aRow["USR_FIRSTNAME"] = $aRow["USRCR_USR_FIRSTNAME"];
|
||||||
$aRow["USR_USERNAME"] = $aRow["USRCR_USR_USERNAME"];
|
$aRow["USR_LASTNAME"] = $aRow["USRCR_USR_LASTNAME"];
|
||||||
|
$aRow["USR_USERNAME"] = $aRow["USRCR_USR_USERNAME"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Unassigned user
|
//Unassigned user
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
global $G_TMP_MENU;
|
global $G_TMP_MENU;
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||||
|
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') == 1 ) {
|
if ($RBAC->userCanAccess('PM_SETUP') == 1 ) {
|
||||||
//settings options
|
//settings options
|
||||||
@@ -42,7 +43,10 @@ if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1) {
|
|||||||
|
|
||||||
if ($RBAC->userCanAccess('PM_SETUP') == 1 ) {
|
if ($RBAC->userCanAccess('PM_SETUP') == 1 ) {
|
||||||
$G_TMP_MENU->AddIdRawOption('SKINS', 'skinsList', G::LoadTranslation('ID_SKINS'), 'icon-skins.png', '', 'settings');
|
$G_TMP_MENU->AddIdRawOption('SKINS', 'skinsList', G::LoadTranslation('ID_SKINS'), 'icon-skins.png', '', 'settings');
|
||||||
$G_TMP_MENU->AddIdRawOption('HEARTBEAT', 'processHeartBeatConfig', G::LoadTranslation('ID_HEARTBEAT_CONFIG'), "heartBeat.jpg",'', 'settings');
|
if (!$partnerFlag) {
|
||||||
|
$G_TMP_MENU->AddIdRawOption('HEARTBEAT', 'processHeartBeatConfig', G::LoadTranslation('ID_HEARTBEAT_CONFIG'), "heartBeat.jpg",'', 'settings');
|
||||||
|
}
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption('ENVIRONMENT_SETTINGS', 'environmentSettings', G::LoadTranslation('ID_ENVIRONMENT_SETTINGS'), "",'', 'settings');
|
$G_TMP_MENU->AddIdRawOption('ENVIRONMENT_SETTINGS', 'environmentSettings', G::LoadTranslation('ID_ENVIRONMENT_SETTINGS'), "",'', 'settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +67,6 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
|||||||
}
|
}
|
||||||
//tools options
|
//tools options
|
||||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1 ) {
|
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1 ) {
|
||||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
|
||||||
if (!$partnerFlag) {
|
if (!$partnerFlag) {
|
||||||
$G_TMP_MENU->AddIdRawOption('PLUGINS', 'pluginsMain', 'Plugins Manager', 'icon-plugins.png', '', 'plugins');
|
$G_TMP_MENU->AddIdRawOption('PLUGINS', 'pluginsMain', 'Plugins Manager', 'icon-plugins.png', '', 'plugins');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ class Ajax
|
|||||||
public function pauseCase()
|
public function pauseCase()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$unpauseDate = $_REQUEST['unpauseDate'];
|
$unpauseDate = $_REQUEST['unpauseDate'] . ' '. $_REQUEST['unpauseTime'];
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
if (isset($_POST['APP_UID']) && isset($_POST['DEL_INDEX'])) {
|
if (isset($_POST['APP_UID']) && isset($_POST['DEL_INDEX'])) {
|
||||||
$APP_UID = $_POST['APP_UID'];
|
$APP_UID = $_POST['APP_UID'];
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
// End save
|
// End save
|
||||||
|
|
||||||
|
|
||||||
$unpauseDate = $_POST['unpausedate'];
|
$unpauseDate = $_POST['unpausedate'] . ' '. $_REQUEST['unpauseTime'];
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
if (isset( $_POST['APP_UID'] ) && isset( $_POST['DEL_INDEX'] )) {
|
if (isset( $_POST['APP_UID'] ) && isset( $_POST['DEL_INDEX'] )) {
|
||||||
$APP_UID = $_POST['APP_UID'];
|
$APP_UID = $_POST['APP_UID'];
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ $oStep = $oStep->loadByProcessTaskPosition( $case['PRO_UID'], $case['TAS_UID'],
|
|||||||
$oHeadPublisher->assign( 'uri', $script . $uri );
|
$oHeadPublisher->assign( 'uri', $script . $uri );
|
||||||
$oHeadPublisher->assign( '_APP_NUM', '#: ' . $case['APP_NUMBER'] );
|
$oHeadPublisher->assign( '_APP_NUM', '#: ' . $case['APP_NUMBER'] );
|
||||||
$oHeadPublisher->assign( '_ENV_CURRENT_DATE', $conf->getSystemDate( date( 'Y-m-d' ) ) );
|
$oHeadPublisher->assign( '_ENV_CURRENT_DATE', $conf->getSystemDate( date( 'Y-m-d' ) ) );
|
||||||
$oHeadPublisher->assign( '_ENV_CURRENT_DATE_NO_FORMAT', date( 'Y-m-d' ) );
|
$oHeadPublisher->assign( '_ENV_CURRENT_DATE_NO_FORMAT', date( 'Y-m-d-h-i-A' ) );
|
||||||
$oHeadPublisher->assign( 'idfirstform', is_null( $oStep ) ? '' : $oStep->getStepUidObj() );
|
$oHeadPublisher->assign( 'idfirstform', is_null( $oStep ) ? '' : $oStep->getStepUidObj() );
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ if (is_array( $aData )) {
|
|||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
$aCase = $oCases->loadCaseInCurrentDelegation( $data->APP_UID );
|
//$aCase = $oCases->loadCaseInCurrentDelegation( $data->APP_UID );
|
||||||
$oCases->reassignCase( $aCase['APP_UID'], $aCase['DEL_INDEX'], ($aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED']), $data->APP_REASSIGN_USER_UID );
|
$oCases->reassignCase( $row['APP_UID'], $row['DEL_INDEX'], ($row['USR_UID'] != '' ? $row['USR_UID'] : $_SESSION['USER_LOGGED']), $data->APP_REASSIGN_USER_UID );
|
||||||
$currentCasesReassigned ++;
|
$currentCasesReassigned ++;
|
||||||
$casesReassignedCount ++;
|
$casesReassignedCount ++;
|
||||||
$serverResponse[] = array ('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER,'APP_TITLE' => $data->APP_TITLE,'TAS_TITLE' => $data->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned
|
$serverResponse[] = array ('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER,'APP_TITLE' => $data->APP_TITLE,'TAS_TITLE' => $data->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned
|
||||||
|
|||||||
@@ -55,10 +55,10 @@ if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'
|
|||||||
|
|
||||||
G::LoadClass('spool');
|
G::LoadClass('spool');
|
||||||
$oSpool = new spoolRun();
|
$oSpool = new spoolRun();
|
||||||
if ($aSetup['MESS_RAUTH'] == false || (is_string($aSetup['MESS_RAUTH']) && $aSetup['MESS_RAUTH'] == 'false')) {
|
if ($aSetup['MESS_RAUTH'] == false || (is_string($aSetup['MESS_RAUTH']) && $aSetup['MESS_RAUTH'] == 'false')) {
|
||||||
$aSetup['MESS_RAUTH'] = 0;
|
$aSetup['MESS_RAUTH'] = 0;
|
||||||
} else {
|
} else {
|
||||||
$aSetup['MESS_RAUTH'] = 1;
|
$aSetup['MESS_RAUTH'] = 1;
|
||||||
}
|
}
|
||||||
$oSpool->setConfig( array(
|
$oSpool->setConfig( array(
|
||||||
'MESS_ENGINE' => $aSetup['MESS_ENGINE'],
|
'MESS_ENGINE' => $aSetup['MESS_ENGINE'],
|
||||||
@@ -115,7 +115,7 @@ if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'
|
|||||||
G::SendTemporalMessage ($e->getMessage(), "warning", 'string');
|
G::SendTemporalMessage ($e->getMessage(), "warning", 'string');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$msg = G::LoadTranslation('ID_USER') . ' ' . $data['USR_USERNAME'] . ' '. G::LoadTranslation('ID_IS_NOT_REGISTERED');
|
$msg = G::LoadTranslation('ID_USER') . ' ' . htmlentities($data['USR_USERNAME'], ENT_QUOTES, 'UTF-8') . ' '. G::LoadTranslation('ID_IS_NOT_REGISTERED');
|
||||||
G::SendTemporalMessage ($msg, "warning", 'string');
|
G::SendTemporalMessage ($msg, "warning", 'string');
|
||||||
G::header('location: forgotPassword');
|
G::header('location: forgotPassword');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -612,4 +612,19 @@ switch ($_POST['action']) {
|
|||||||
$response['descriptionText'] = $span . $gif . $text . '</span>';
|
$response['descriptionText'] = $span . $gif . $text . '</span>';
|
||||||
echo G::json_encode($response);
|
echo G::json_encode($response);
|
||||||
break;
|
break;
|
||||||
|
case "passwordValidate":
|
||||||
|
$messageResultLogin = "";
|
||||||
|
$password = $_POST["password"];
|
||||||
|
$resultLogin = $RBAC->VerifyLogin($_SESSION["USR_USERNAME"], $password);
|
||||||
|
|
||||||
|
if($resultLogin == $_SESSION["USER_LOGGED"]) {
|
||||||
|
$messageResultLogin = "OK";
|
||||||
|
} else {
|
||||||
|
$messageResultLogin = "ERROR";
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = array();
|
||||||
|
$response["result"] = $messageResultLogin;
|
||||||
|
echo G::json_encode($response);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ $oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript fi
|
|||||||
// $oHeadPublisher->addContent('users/users'); //adding a html file .html.
|
// $oHeadPublisher->addContent('users/users'); //adding a html file .html.
|
||||||
$oHeadPublisher->assign( 'USR_UID', $aFields['USR_UID'] );
|
$oHeadPublisher->assign( 'USR_UID', $aFields['USR_UID'] );
|
||||||
$oHeadPublisher->assign( 'infoMode', true );
|
$oHeadPublisher->assign( 'infoMode', true );
|
||||||
|
$oHeadPublisher->assign( 'EDITPROFILE', 1);
|
||||||
$oHeadPublisher->assign( 'canEdit', $canEdit );
|
$oHeadPublisher->assign( 'canEdit', $canEdit );
|
||||||
$oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
|
$oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
|
||||||
$oHeadPublisher->assign( 'MODE', '' );
|
$oHeadPublisher->assign( 'MODE', '' );
|
||||||
|
|||||||
@@ -22,6 +22,18 @@ var storeCases;
|
|||||||
var storeReassignCases;
|
var storeReassignCases;
|
||||||
var grid;
|
var grid;
|
||||||
var textJump;
|
var textJump;
|
||||||
|
var ids = '';
|
||||||
|
|
||||||
|
function formatAMPM(date, initVal) {
|
||||||
|
var hours = date.getHours();
|
||||||
|
var minutes = (initVal === true)? ((date.getMinutes()<15)? 0: ((date.getMinutes()<30)? 15: ((date.getMinutes()<45)? 30: 45))): date.getMinutes();
|
||||||
|
var ampm = hours >= 12 ? 'PM' : 'AM';
|
||||||
|
hours = hours % 12;
|
||||||
|
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||||
|
minutes = minutes < 10 ? '0' + minutes : minutes;
|
||||||
|
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||||
|
return strTime;
|
||||||
|
}
|
||||||
|
|
||||||
Ext.Ajax.timeout = 4 * 60 * 1000;
|
Ext.Ajax.timeout = 4 * 60 * 1000;
|
||||||
|
|
||||||
@@ -202,6 +214,14 @@ function pauseCase(date){
|
|||||||
{
|
{
|
||||||
html: '<div align="center" style="font: 14px tahoma,arial,helvetica,sans-serif">' + _('ID_PAUSE_CASE_TO_DATE') +' '+date.format('M j, Y')+'? </div> <br/>'
|
html: '<div align="center" style="font: 14px tahoma,arial,helvetica,sans-serif">' + _('ID_PAUSE_CASE_TO_DATE') +' '+date.format('M j, Y')+'? </div> <br/>'
|
||||||
},
|
},
|
||||||
|
new Ext.form.TimeField({
|
||||||
|
id: 'unpauseTime',
|
||||||
|
fieldLabel: _('ID_UNPAUSE_TIME'),
|
||||||
|
name: 'unpauseTime',
|
||||||
|
value: formatAMPM(new Date(), false),
|
||||||
|
minValue: formatAMPM(new Date(), true),
|
||||||
|
format: 'h:i A'
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
xtype: 'textarea',
|
xtype: 'textarea',
|
||||||
id: 'noteReason',
|
id: 'noteReason',
|
||||||
@@ -251,7 +271,15 @@ function pauseCase(date){
|
|||||||
Ext.MessageBox.hide();
|
Ext.MessageBox.hide();
|
||||||
msgPause.close();
|
msgPause.close();
|
||||||
},
|
},
|
||||||
params: {action:'pauseCase', unpausedate:unpauseDate, APP_UID:rowModel.data.APP_UID, DEL_INDEX: rowModel.data.DEL_INDEX, NOTE_REASON: noteReasonTxt, NOTIFY_PAUSE: notifyReasonVal}
|
params: {
|
||||||
|
action: 'pauseCase',
|
||||||
|
unpausedate: unpauseDate,
|
||||||
|
unpauseTime: Ext.getCmp('unpauseTime').getValue(),
|
||||||
|
APP_UID: rowModel.data.APP_UID,
|
||||||
|
DEL_INDEX: rowModel.data.DEL_INDEX,
|
||||||
|
NOTE_REASON: noteReasonTxt,
|
||||||
|
NOTIFY_PAUSE: notifyReasonVal
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
@@ -2127,6 +2155,7 @@ function reassign(){
|
|||||||
ids += rows[i].get('APP_UID') + "|" + rows[i].get('TAS_UID')+ "|" + rows[i].get('DEL_INDEX');
|
ids += rows[i].get('APP_UID') + "|" + rows[i].get('TAS_UID')+ "|" + rows[i].get('DEL_INDEX');
|
||||||
}
|
}
|
||||||
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
|
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
|
||||||
|
//storeReassignCases.setBaseParam( 'action', 'to_reassign');
|
||||||
storeReassignCases.load();
|
storeReassignCases.load();
|
||||||
|
|
||||||
newPopUp.show();
|
newPopUp.show();
|
||||||
|
|||||||
@@ -21,6 +21,17 @@ ActionTabFrameGlobal.tabName = '';
|
|||||||
ActionTabFrameGlobal.tabTitle = '';
|
ActionTabFrameGlobal.tabTitle = '';
|
||||||
ActionTabFrameGlobal.tabData = '';
|
ActionTabFrameGlobal.tabData = '';
|
||||||
|
|
||||||
|
function formatAMPM(date, initVal) {
|
||||||
|
var hours = date.getHours();
|
||||||
|
var minutes = (initVal === true)? ((date.getMinutes()<15)? 0: ((date.getMinutes()<30)? 15: ((date.getMinutes()<45)? 30: 45))): date.getMinutes();
|
||||||
|
var ampm = hours >= 12 ? 'PM' : 'AM';
|
||||||
|
hours = hours % 12;
|
||||||
|
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||||
|
minutes = minutes < 10 ? '0'+minutes : minutes;
|
||||||
|
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||||
|
return strTime;
|
||||||
|
}
|
||||||
|
|
||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
openToRevisePanel = function() {
|
openToRevisePanel = function() {
|
||||||
var treeToRevise = new Ext.tree.TreePanel({
|
var treeToRevise = new Ext.tree.TreePanel({
|
||||||
@@ -669,6 +680,7 @@ Ext.onReady(function(){
|
|||||||
nDay = '' + (parseInt(curDate[2])+1);
|
nDay = '' + (parseInt(curDate[2])+1);
|
||||||
nDay = nDay.length == 1 ? '0' + nDay : nDay;
|
nDay = nDay.length == 1 ? '0' + nDay : nDay;
|
||||||
filterDate += nDay;
|
filterDate += nDay;
|
||||||
|
filterTime = ('0' + curDate[3]).slice(-2) + ':' + ('0' + curDate[4]).slice(-2) + ' ' + curDate[5];
|
||||||
|
|
||||||
var fieldset = {
|
var fieldset = {
|
||||||
xtype : 'fieldset',
|
xtype : 'fieldset',
|
||||||
@@ -692,6 +704,14 @@ Ext.onReady(function(){
|
|||||||
value: filterDate,
|
value: filterDate,
|
||||||
minValue: filterDate
|
minValue: filterDate
|
||||||
}),
|
}),
|
||||||
|
new Ext.form.TimeField({
|
||||||
|
id: 'unpauseTime',
|
||||||
|
fieldLabel: _('ID_UNPAUSE_TIME'),
|
||||||
|
name: 'unpauseTime',
|
||||||
|
value: filterTime,
|
||||||
|
minValue: formatAMPM(new Date(), true),
|
||||||
|
format: 'h:i A'
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
xtype: 'textarea',
|
xtype: 'textarea',
|
||||||
id: 'noteReason',
|
id: 'noteReason',
|
||||||
@@ -726,15 +746,15 @@ Ext.onReady(function(){
|
|||||||
id: 'unpauseFrm',
|
id: 'unpauseFrm',
|
||||||
labelAlign : 'right',
|
labelAlign : 'right',
|
||||||
//bodyStyle : 'padding:5px 5px 0',
|
//bodyStyle : 'padding:5px 5px 0',
|
||||||
width : 250,
|
width : 260,
|
||||||
items : [fieldset]
|
items : [fieldset]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var win = new Ext.Window({
|
var win = new Ext.Window({
|
||||||
title: _('ID_PAUSE_CASE'),
|
title: _('ID_PAUSE_CASE'),
|
||||||
width: 370,
|
width: 380,
|
||||||
height: 230,
|
height: 250,
|
||||||
layout:'fit',
|
layout:'fit',
|
||||||
autoScroll:true,
|
autoScroll:true,
|
||||||
modal: true,
|
modal: true,
|
||||||
@@ -755,20 +775,22 @@ Ext.onReady(function(){
|
|||||||
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
|
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
|
||||||
|
|
||||||
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
|
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
|
||||||
|
var vUnpauseTime = Ext.getCmp('unpauseTime').getValue();
|
||||||
if( unpauseDate == '') {
|
if( unpauseDate == '') {
|
||||||
//Ext.getCmp('submitPauseCase').setDisabled(true);
|
//Ext.getCmp('submitPauseCase').setDisabled(true);
|
||||||
return;
|
return;
|
||||||
} else
|
} else {
|
||||||
//Ext.getCmp('submitPauseCase').enable();
|
//Ext.getCmp('submitPauseCase').enable();
|
||||||
|
unpauseDate = unpauseDate.format('Y-m-d');
|
||||||
unpauseDate = unpauseDate.format('Y-m-d');
|
}
|
||||||
|
|
||||||
Ext.getCmp('unpauseFrm').getForm().submit({
|
Ext.getCmp('unpauseFrm').getForm().submit({
|
||||||
url:'ajaxListener',
|
url:'ajaxListener',
|
||||||
method : 'post',
|
method : 'post',
|
||||||
params : {
|
params : {
|
||||||
action: 'pauseCase',
|
action: 'pauseCase',
|
||||||
unpauseDate:unpauseDate,
|
unpauseDate: unpauseDate,
|
||||||
|
unpauseTime: vUnpauseTime,
|
||||||
NOTE_REASON: noteReasonTxt,
|
NOTE_REASON: noteReasonTxt,
|
||||||
NOTIFY_PAUSE: notifyReasonVal
|
NOTIFY_PAUSE: notifyReasonVal
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -501,6 +501,15 @@ Ext.onReady(function () {
|
|||||||
var passwordFields = new Ext.form.FieldSet({
|
var passwordFields = new Ext.form.FieldSet({
|
||||||
title : _('ID_CHANGE_PASSWORD'),
|
title : _('ID_CHANGE_PASSWORD'),
|
||||||
items : [
|
items : [
|
||||||
|
{
|
||||||
|
xtype : "textfield",
|
||||||
|
id : "currentPassword",
|
||||||
|
name : "currentPassword",
|
||||||
|
fieldLabel : _("ID_PASSWORD_CURRENT"),
|
||||||
|
inputType : "password",
|
||||||
|
hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? false : true,
|
||||||
|
width : 260
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id : 'USR_NEW_PASS',
|
id : 'USR_NEW_PASS',
|
||||||
fieldLabel : _('ID_NEW_PASSWORD'),
|
fieldLabel : _('ID_NEW_PASSWORD'),
|
||||||
@@ -1027,6 +1036,48 @@ function validateUserName() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function userFrmEditSubmit()
|
||||||
|
{
|
||||||
|
Ext.getCmp("USR_STATUS").setDisabled(readMode);
|
||||||
|
Ext.getCmp("frmDetails").getForm().submit({
|
||||||
|
url : "usersAjax",
|
||||||
|
params : {
|
||||||
|
action : "saveUser",
|
||||||
|
USR_UID : USR_UID,
|
||||||
|
USR_CITY : global.IS_UID
|
||||||
|
},
|
||||||
|
waitMsg : _("ID_SAVING"),
|
||||||
|
timeout : 36000,
|
||||||
|
success : function (obj, resp) {
|
||||||
|
if (!infoMode) {
|
||||||
|
location.href = "users_List";
|
||||||
|
} else {
|
||||||
|
location.href = "../users/myInfo?type=reload";
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
failure : function (obj, resp) {
|
||||||
|
if (typeof resp.result == "undefined")
|
||||||
|
{
|
||||||
|
Ext.Msg.alert(_("ID_ERROR"), _("ID_SOME_FIELDS_REQUIRED"));
|
||||||
|
} else{
|
||||||
|
if (resp.result.msg){
|
||||||
|
var message = resp.result.msg.split(",");
|
||||||
|
Ext.Msg.alert(_("ID_WARNING"), "<strong>"+message[0]+"<strong><br/><br/>"+message[1]+"<br/><br/>"+message[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resp.result.fileError) {
|
||||||
|
Ext.Msg.alert(_("ID_ERROR"), _("ID_FILE_TOO_BIG"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resp.result.error) {
|
||||||
|
Ext.Msg.alert(_("ID_ERROR"), resp.result.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function saveUser()
|
function saveUser()
|
||||||
{
|
{
|
||||||
if (Ext.getCmp('USR_USERNAME').getValue() != '') {
|
if (Ext.getCmp('USR_USERNAME').getValue() != '') {
|
||||||
@@ -1069,46 +1120,40 @@ function saveUser()
|
|||||||
var confPass = frmDetails.getForm().findField('USR_CNF_PASS').getValue();
|
var confPass = frmDetails.getForm().findField('USR_CNF_PASS').getValue();
|
||||||
|
|
||||||
if (confPass === newPass) {
|
if (confPass === newPass) {
|
||||||
Ext.getCmp('USR_STATUS').setDisabled(readMode);
|
if(typeof(EDITPROFILE) != "undefined" && EDITPROFILE == 1 && newPass != "") {
|
||||||
Ext.getCmp('frmDetails').getForm().submit({
|
var currentPassword = Ext.getCmp("currentPassword").getValue();
|
||||||
url : 'usersAjax',
|
|
||||||
params : {
|
if(currentPassword != "") {
|
||||||
action : 'saveUser',
|
Ext.Ajax.request({
|
||||||
USR_UID : USR_UID,
|
url: "usersAjax",
|
||||||
USR_CITY : global.IS_UID
|
method: "POST",
|
||||||
},
|
|
||||||
waitMsg : _('ID_SAVING'),
|
params: {
|
||||||
timeout : 36000,
|
action: "passwordValidate",
|
||||||
success : function (obj, resp) {
|
password: currentPassword
|
||||||
if (!infoMode) {
|
},
|
||||||
location.href = 'users_List';
|
|
||||||
|
success: function (response, opts) {
|
||||||
|
var dataRespuesta = Ext.util.JSON.decode(response.responseText);
|
||||||
|
|
||||||
|
if (dataRespuesta.result == "OK") {
|
||||||
|
userFrmEditSubmit();
|
||||||
|
} else {
|
||||||
|
Ext.MessageBox.alert(_("ID_ERROR"), _("ID_PASSWORD_CURRENT_INCORRECT"));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
failure: function (response, opts){
|
||||||
|
//
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
location.href = '../users/myInfo?type=reload';
|
Ext.MessageBox.alert(_("ID_ERROR"), _("ID_PASSWORD_CURRENT_ENTER"));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
userFrmEditSubmit();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
} else {
|
||||||
failure : function (obj, resp) {
|
|
||||||
if (typeof resp.result == "undefined")
|
|
||||||
{
|
|
||||||
Ext.Msg.alert(_('ID_ERROR'), _('ID_SOME_FIELDS_REQUIRED'));
|
|
||||||
} else{
|
|
||||||
if (resp.result.msg){
|
|
||||||
var message = resp.result.msg.split(',');
|
|
||||||
Ext.Msg.alert(_('ID_WARNING'), '<strong>'+message[0]+'<strong><br/><br/>'+message[1]+'<br/><br/>'+message[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resp.result.fileError) {
|
|
||||||
Ext.Msg.alert(_('ID_ERROR'), _('ID_FILE_TOO_BIG'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resp.result.error) {
|
|
||||||
Ext.Msg.alert(_('ID_ERROR'), resp.result.error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Ext.Msg.alert(_('ID_ERROR'), _('ID_PASSWORDS_DONT_MATCH'));
|
Ext.Msg.alert(_('ID_ERROR'), _('ID_PASSWORDS_DONT_MATCH'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user