Merged colosa/processmaker into master
This commit is contained in:
@@ -2865,8 +2865,9 @@ function PMFRemoveMask ($field, $separator = '.', $currency = '')
|
|||||||
$field = str_replace($thousandSeparator, "", $field);
|
$field = str_replace($thousandSeparator, "", $field);
|
||||||
$field = str_replace($decimalSeparator, ".", $field);
|
$field = str_replace($decimalSeparator, ".", $field);
|
||||||
$field = str_replace($currency, "", $field);
|
$field = str_replace($currency, "", $field);
|
||||||
$field = floatval(trim($field));
|
if(strpos($decimalSeparator, $field) !== false){
|
||||||
|
$field = (float)(trim($field));
|
||||||
|
}
|
||||||
return $field;
|
return $field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -450,5 +450,14 @@ class CalendarDefinition extends BaseCalendarDefinition
|
|||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
return $oDataset->getRow();
|
return $oDataset->getRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function calendarName ($calendarUid)
|
||||||
|
{
|
||||||
|
$tr = CalendarDefinitionPeer::retrieveByPK( $calendarUid );
|
||||||
|
if ((is_object( $tr ) && get_class( $tr ) == 'CalendarDefinition')) {
|
||||||
|
return $tr->getCalendarName();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -287,10 +287,21 @@ class Users extends BaseUsers
|
|||||||
$arrayData["birthday"] = $aFields["USR_BIRTHDAY"];
|
$arrayData["birthday"] = $aFields["USR_BIRTHDAY"];
|
||||||
$arrayData["position"] = $aFields["USR_POSITION"];
|
$arrayData["position"] = $aFields["USR_POSITION"];
|
||||||
$arrayData["replacedby"] = $aFields["USR_REPLACED_BY"];
|
$arrayData["replacedby"] = $aFields["USR_REPLACED_BY"];
|
||||||
|
if(strlen($arrayData["replacedby"] != 0)){
|
||||||
|
$oUser = UsersPeer::retrieveByPK( $arrayData["replacedby"] );
|
||||||
|
$arrayData["replacedbyfullname"] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
|
||||||
|
}
|
||||||
$arrayData["duedate"] = $aFields["USR_DUE_DATE"];
|
$arrayData["duedate"] = $aFields["USR_DUE_DATE"];
|
||||||
$arrayData["calendar"] = $aFields["USR_CALENDAR"];
|
$arrayData["calendar"] = $aFields["USR_CALENDAR"];
|
||||||
|
if(strlen($aFields["USR_CALENDAR"] != 0)){
|
||||||
|
$arrayData["calendarname"] = $calendar->calendarName( $aFields["USR_CALENDAR"] );
|
||||||
|
}
|
||||||
$arrayData["status"] = $aFields["USR_STATUS"];
|
$arrayData["status"] = $aFields["USR_STATUS"];
|
||||||
$arrayData["department"] = $aFields["DEP_UID"];
|
$arrayData["department"] = $aFields["DEP_UID"];
|
||||||
|
if (strlen($arrayData["department"]) != 0) {
|
||||||
|
$oDepart = DepartmentPeer::retrieveByPk( $arrayData["department"] );
|
||||||
|
$arrayData["departmentname"] = $oDepart->getDepTitle();
|
||||||
|
}
|
||||||
$arrayData["reportsto"] = $aFields["USR_REPORTS_TO"];
|
$arrayData["reportsto"] = $aFields["USR_REPORTS_TO"];
|
||||||
$arrayData["userexperience"] = $aFields["USR_UX"];
|
$arrayData["userexperience"] = $aFields["USR_UX"];
|
||||||
$arrayData["photo"] = $pathPhoto;
|
$arrayData["photo"] = $pathPhoto;
|
||||||
|
|||||||
@@ -42,9 +42,15 @@ if ($access != 1) {
|
|||||||
//$oProcessMap = new ProcessMap();
|
//$oProcessMap = new ProcessMap();
|
||||||
|
|
||||||
$uids = explode(',', $_POST['PRO_UIDS']);
|
$uids = explode(',', $_POST['PRO_UIDS']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
foreach ($uids as $uid) {
|
foreach ($uids as $uid) {
|
||||||
|
//Add Audit Log
|
||||||
|
$oProcess = new Process();
|
||||||
|
$process=$oProcess->load($uid);
|
||||||
|
$nameProcess=$process['PRO_TITLE'];
|
||||||
|
G::auditLog("DeleteProcess", $nameProcess. ' ('.$uid.')' .' Deleted');
|
||||||
|
|
||||||
//$oProcessMap->deleteProcess($uid);
|
//$oProcessMap->deleteProcess($uid);
|
||||||
ProcessMaker\Project\Workflow::removeIfExists($uid);
|
ProcessMaker\Project\Workflow::removeIfExists($uid);
|
||||||
ProcessMaker\Project\Bpmn::removeIfExists($uid);
|
ProcessMaker\Project\Bpmn::removeIfExists($uid);
|
||||||
|
|||||||
@@ -303,6 +303,13 @@ if ($action == "uploadFileNewProcess") {
|
|||||||
//!data ouput
|
//!data ouput
|
||||||
$result->sNewProUid = $sProUid;
|
$result->sNewProUid = $sProUid;
|
||||||
$result->proFileName = $Fields['PRO_FILENAME'];
|
$result->proFileName = $Fields['PRO_FILENAME'];
|
||||||
|
|
||||||
|
//Add Audit Log
|
||||||
|
$ogetProcess = new Process();
|
||||||
|
$getprocess=$ogetProcess->load($oData->process['PRO_UID']);
|
||||||
|
$nameProcess=$getprocess['PRO_TITLE'];
|
||||||
|
G::auditLog("ImportProcess", 'PM File Imported '.$nameProcess. ' ('.$oData->process['PRO_UID'].')');
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$result->response = $e->getMessage();
|
$result->response = $e->getMessage();
|
||||||
$result->catchMessage = $e->getMessage();
|
$result->catchMessage = $e->getMessage();
|
||||||
|
|||||||
@@ -150,7 +150,9 @@ $arrayAction = array(
|
|||||||
"AssignUserTask" => G::LoadTranslation("ID_ASSIGN_USER_TASK"),
|
"AssignUserTask" => G::LoadTranslation("ID_ASSIGN_USER_TASK"),
|
||||||
"AssignGroupTask" => G::LoadTranslation("ID_ASSIGN_GROUP_TASK"),
|
"AssignGroupTask" => G::LoadTranslation("ID_ASSIGN_GROUP_TASK"),
|
||||||
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
|
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
|
||||||
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK")
|
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK"),
|
||||||
|
"ImportProcess" => G::LoadTranslation("ID_IMPORT_PROCESS"),
|
||||||
|
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS")
|
||||||
);
|
);
|
||||||
|
|
||||||
asort($arrayAction);
|
asort($arrayAction);
|
||||||
|
|||||||
@@ -1005,9 +1005,7 @@ class CaseScheduler
|
|||||||
case "UPD":
|
case "UPD":
|
||||||
$arrayDataAux = $caseScheduler->load($caseSchedulerUid);
|
$arrayDataAux = $caseScheduler->load($caseSchedulerUid);
|
||||||
|
|
||||||
if ($arrayData["SCH_END_DATE"] != "") {
|
|
||||||
$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayData["SCH_END_DATE"];
|
$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayData["SCH_END_DATE"];
|
||||||
}
|
|
||||||
|
|
||||||
//If the start date has changed then recalculate the next run time
|
//If the start date has changed then recalculate the next run time
|
||||||
$recalculateDate = ($arrayData["SCH_START_DATE"] == $arrayData["PREV_SCH_START_DATE"])? false : true;
|
$recalculateDate = ($arrayData["SCH_START_DATE"] == $arrayData["PREV_SCH_START_DATE"])? false : true;
|
||||||
|
|||||||
@@ -77,6 +77,12 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$this->wp = new Project\Workflow();
|
$this->wp = new Project\Workflow();
|
||||||
$this->wp->create($wpData);
|
$this->wp->create($wpData);
|
||||||
|
|
||||||
|
//Add Audit Log
|
||||||
|
$ogetProcess = new \Process();
|
||||||
|
$getprocess=$ogetProcess->load($this->getUid());
|
||||||
|
$nameProcess=$getprocess['PRO_TITLE'];
|
||||||
|
\G::auditLog("ImportProcess", 'PMX File Imported '.$nameProcess. ' ('.$this->getUid().')');
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$prjUid = $this->getUid();
|
$prjUid = $this->getUid();
|
||||||
//$this->remove();
|
//$this->remove();
|
||||||
|
|||||||
@@ -64,6 +64,13 @@ class WorkflowBpmn extends Project\Workflow
|
|||||||
// At this time we will add a default diagram and process
|
// At this time we will add a default diagram and process
|
||||||
$this->bp->addDiagram();
|
$this->bp->addDiagram();
|
||||||
$this->bp->addProcess();
|
$this->bp->addProcess();
|
||||||
|
|
||||||
|
//Add Audit Log
|
||||||
|
$ogetProcess = new \Process();
|
||||||
|
$getprocess=$ogetProcess->load($this->getUid());
|
||||||
|
$nameProcess=$getprocess['PRO_TITLE'];
|
||||||
|
\G::auditLog("ImportProcess", 'BPMN Imported '.$nameProcess. ' ('.$this->getUid().')');
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$prjUid = $this->getUid();
|
$prjUid = $this->getUid();
|
||||||
$this->remove();
|
$this->remove();
|
||||||
|
|||||||
@@ -190,8 +190,14 @@ class PmPdo implements \OAuth2\Storage\AuthorizationCodeInterface,
|
|||||||
/* OAuth2_Storage_UserCredentialsInterface */
|
/* OAuth2_Storage_UserCredentialsInterface */
|
||||||
public function checkUserCredentials($username, $password)
|
public function checkUserCredentials($username, $password)
|
||||||
{
|
{
|
||||||
if ($user = $this->getUser($username)) {
|
$RBAC = \RBAC::getSingleton();
|
||||||
return $this->checkPassword($user, $password);
|
$RBAC->initRBAC();
|
||||||
|
$uid = $RBAC->VerifyLogin($username , $password);
|
||||||
|
if($uid < 0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($uid != ''){
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
|||||||
'<td class="x-cnotes-label"><img border="0" src="../users/users_ViewPhotoGrid?pUID={USR_UID}" width="40" height="40"/></td>' +
|
'<td class="x-cnotes-label"><img border="0" src="../users/users_ViewPhotoGrid?pUID={USR_UID}" width="40" height="40"/></td>' +
|
||||||
'<td class="x-cnotes-name">'+
|
'<td class="x-cnotes-name">'+
|
||||||
'<p class="user-from">{user}</p>'+
|
'<p class="user-from">{user}</p>'+
|
||||||
'<p style="width: 260px; overflow-x:auto; height: 40px;", class="x-editable x-message">{NOTE_CONTENT}</p> '+
|
'<p style="width: 370px; overflow-x:auto; height: 80px;", class="x-editable x-message">{NOTE_CONTENT}</p> '+
|
||||||
'<p class="x-editable"><small>'+_('ID_POSTED_AT')+'<i> {NOTE_DATE}</i></small></p>'+
|
'<p class="x-editable"><small>'+_('ID_POSTED_AT')+'<i> {NOTE_DATE}</i></small></p>'+
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
@@ -173,13 +173,13 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
|||||||
caseNotesWindow = new Ext.Window({
|
caseNotesWindow = new Ext.Window({
|
||||||
title: _('ID_CASES_NOTES'), //Title of the Window
|
title: _('ID_CASES_NOTES'), //Title of the Window
|
||||||
id: 'caseNotesWindowPanel', //ID of the Window Panel
|
id: 'caseNotesWindowPanel', //ID of the Window Panel
|
||||||
width: 380, //Width of the Window
|
width: 480, //Width of the Window
|
||||||
resizable: true, //Resize of the Window, if false - it cannot be resized
|
resizable: true, //Resize of the Window, if false - it cannot be resized
|
||||||
closable: true, //Hide close button of the Window
|
closable: true, //Hide close button of the Window
|
||||||
modal: modalSw, //When modal:true it make the window modal and mask everything behind it when displayed
|
modal: modalSw, //When modal:true it make the window modal and mask everything behind it when displayed
|
||||||
//iconCls: 'ICON_CASES_NOTES',
|
//iconCls: 'ICON_CASES_NOTES',
|
||||||
autoCreate: true,
|
autoCreate: true,
|
||||||
height:400,
|
height:450,
|
||||||
shadow:true,
|
shadow:true,
|
||||||
minWidth:380,
|
minWidth:380,
|
||||||
minHeight:200,
|
minHeight:200,
|
||||||
@@ -207,12 +207,12 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
|||||||
xtype : 'textarea',
|
xtype : 'textarea',
|
||||||
id : 'caseNoteText',
|
id : 'caseNoteText',
|
||||||
name : 'caseNoteText',
|
name : 'caseNoteText',
|
||||||
width : 330,
|
width : 440,
|
||||||
grow : true,
|
grow : true,
|
||||||
height : 40,
|
height : 100,
|
||||||
growMin: 40,
|
growMin: 100,
|
||||||
growMax: 80,
|
growMax: 80,
|
||||||
maxLengthText : 500,
|
maxLengthText : 1500,
|
||||||
allowBlank :false,
|
allowBlank :false,
|
||||||
selectOnFocus :true,
|
selectOnFocus :true,
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
@@ -238,7 +238,7 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
|||||||
boxLabel: _("ID_CASE_NOTES_LABEL_SEND")
|
boxLabel: _("ID_CASE_NOTES_LABEL_SEND")
|
||||||
},
|
},
|
||||||
'->',
|
'->',
|
||||||
'<span id="countChar">500</span>',
|
'<span id="countChar">1500</span>',
|
||||||
' ',
|
' ',
|
||||||
{
|
{
|
||||||
id: 'sendBtn',
|
id: 'sendBtn',
|
||||||
@@ -306,10 +306,10 @@ function updateTextCtr(body, event) {
|
|||||||
ctr = document.getElementById('countChar').innerHTML;
|
ctr = document.getElementById('countChar').innerHTML;
|
||||||
|
|
||||||
text = Ext.getCmp('caseNoteText').getValue();
|
text = Ext.getCmp('caseNoteText').getValue();
|
||||||
maxLength = 500;
|
maxLength = 1500;
|
||||||
|
|
||||||
if (text.length > maxLength) {
|
if (text.length > maxLength) {
|
||||||
Ext.getCmp('caseNoteText').setValue(Ext.getCmp('caseNoteText').getValue().substr(0,500));
|
Ext.getCmp('caseNoteText').setValue(Ext.getCmp('caseNoteText').getValue().substr(0,1500));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.getElementById('countChar').innerHTML = maxLength - text.length;
|
document.getElementById('countChar').innerHTML = maxLength - text.length;
|
||||||
@@ -347,7 +347,7 @@ function newNoteHandler()
|
|||||||
document.getElementById('countChar').style.display = 'block';
|
document.getElementById('countChar').style.display = 'block';
|
||||||
Ext.getCmp('caseNoteText').focus();
|
Ext.getCmp('caseNoteText').focus();
|
||||||
Ext.getCmp('caseNoteText').reset();
|
Ext.getCmp('caseNoteText').reset();
|
||||||
document.getElementById('countChar').innerHTML = '500';
|
document.getElementById('countChar').innerHTML = '1500';
|
||||||
caseNotesWindow.doLayout();
|
caseNotesWindow.doLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,19 +120,6 @@ Ext.onReady(function(){
|
|||||||
handler: GridByDefault
|
handler: GridByDefault
|
||||||
});
|
});
|
||||||
|
|
||||||
newForm = new Ext.FormPanel({
|
|
||||||
url: 'processCategory_Ajax?action=saveNewCategory',
|
|
||||||
frame: true,
|
|
||||||
items:[
|
|
||||||
{xtype: 'textfield', fieldLabel: _('ID_CATEGORY_NAME'), name: 'category', width: 250, maxLength :100, allowBlank: false}
|
|
||||||
],
|
|
||||||
buttons: [
|
|
||||||
{text: _('ID_SAVE'), handler: SaveNewCategory},
|
|
||||||
{text: _('ID_CANCEL'), handler: CloseWindow}
|
|
||||||
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
editForm = new Ext.FormPanel({
|
editForm = new Ext.FormPanel({
|
||||||
url: 'processCategory_Ajax?action=updateCategory',
|
url: 'processCategory_Ajax?action=updateCategory',
|
||||||
frame: true,
|
frame: true,
|
||||||
@@ -297,6 +284,18 @@ DoNothing = function(){};
|
|||||||
|
|
||||||
//Open New Category Form
|
//Open New Category Form
|
||||||
NewCategoryWindow = function(){
|
NewCategoryWindow = function(){
|
||||||
|
newForm = new Ext.FormPanel({
|
||||||
|
url: 'processCategory_Ajax?action=saveNewCategory',
|
||||||
|
frame: true,
|
||||||
|
items: [
|
||||||
|
{xtype: 'textfield', fieldLabel: _('ID_CATEGORY_NAME'), name: 'category', width: 250, maxLength :100, allowBlank: false}
|
||||||
|
],
|
||||||
|
buttons: [
|
||||||
|
{text: _('ID_SAVE'), handler: SaveNewCategory},
|
||||||
|
{text: _('ID_CANCEL'), handler: CloseWindow}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
newForm.getForm().reset();
|
newForm.getForm().reset();
|
||||||
newForm.getForm().items.items[0].focus('',500);
|
newForm.getForm().items.items[0].focus('',500);
|
||||||
w = new Ext.Window({
|
w = new Ext.Window({
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<en><![CDATA[Mask]]></en>
|
<en><![CDATA[Mask]]></en>
|
||||||
</PME_MASK>
|
</PME_MASK>
|
||||||
<PME_STRTO type="dropdown" defaultvalue="">
|
<PME_STRTO type="dropdown" defaultvalue="">
|
||||||
<en><![CDATA[Text transform to]]><option name=""><![CDATA[]]></option><option name="UPPER"><![CDATA[UPPER]]></option><option name="LOWER"><![CDATA[LOWER]]></option><option name="PHRASE"><![CDATA[CAPITALIZE PHRASE]]></option><option name="TITLE"><![CDATA[TITLE CASE]]></option></en>
|
<en><![CDATA[Text transform to]]><option name=""><![CDATA[]]></option><option name="UPPER"><![CDATA[UPPER]]></option><option name="LOWER"><![CDATA[lower]]></option><option name="TITLE"><![CDATA[Capitalize Phrase]]></option><option name="PHRASE"><![CDATA[Title case]]></option></en>
|
||||||
</PME_STRTO>
|
</PME_STRTO>
|
||||||
<PME_REQUIRED type="checkbox" falseValue="0" value="1" defaultvalue="0" labelOnRight="0">
|
<PME_REQUIRED type="checkbox" falseValue="0" value="1" defaultvalue="0" labelOnRight="0">
|
||||||
<en><![CDATA[Required]]></en>
|
<en><![CDATA[Required]]></en>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ var showPromptLogin = function(lastAction, pro_uid, fileName, fc64) {
|
|||||||
width:'75%',
|
width:'75%',
|
||||||
marginTop:3,
|
marginTop:3,
|
||||||
backgroundColor:'white',
|
backgroundColor:'white',
|
||||||
border:'1px solid #919B9C',
|
border:'1px solid #919B9C'
|
||||||
});
|
});
|
||||||
label.appendChild(theUser);
|
label.appendChild(theUser);
|
||||||
label.innerHTML = (_('ID_USERNAME')) + ': ';
|
label.innerHTML = (_('ID_USERNAME')) + ': ';
|
||||||
|
|||||||
Reference in New Issue
Block a user