Merge remote branch 'upstream/master'
This commit is contained in:
@@ -197,7 +197,7 @@ class RbacUsers extends BaseRbacUsers
|
||||
$pluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
if ($pluginRegistry->existsTrigger(PM_BEFORE_CREATE_USER)) {
|
||||
try {
|
||||
$pluginRegistry->executeTriggers(PM_BEFORE_CREATE_USER);
|
||||
$pluginRegistry->executeTriggers(PM_BEFORE_CREATE_USER, null);
|
||||
} catch(Exception $error) {
|
||||
throw new Exception($error->getMessage());
|
||||
}
|
||||
|
||||
@@ -84,6 +84,11 @@ class Roles extends BaseRoles {
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
$roles = new Roles();
|
||||
$roles->load($aRow['ROL_UID']);
|
||||
$aRow['ROL_NAME'] = $roles->getRolName();
|
||||
|
||||
if (is_array($aRow)) {
|
||||
return $aRow;
|
||||
} else {
|
||||
@@ -168,10 +173,6 @@ class Roles extends BaseRoles {
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function getAllRoles($systemCode = 'PROCESSMAKER') {
|
||||
$c = $this->listAllRoles($systemCode);
|
||||
$rs = RolesPeer::DoSelectRs($c);
|
||||
@@ -188,7 +189,6 @@ class Roles extends BaseRoles {
|
||||
return $aRows;
|
||||
}
|
||||
|
||||
|
||||
function listAllPermissions($systemCode = 'PROCESSMAKER') {
|
||||
try {
|
||||
$oCriteria = new Criteria('rbac');
|
||||
|
||||
@@ -394,12 +394,44 @@ class Applications
|
||||
$totalCount = AppCacheViewPeer::doCount($CriteriaCount, $distinct);
|
||||
}
|
||||
|
||||
//add sortable options
|
||||
if ($sort != '') {
|
||||
if ($dir == 'DESC') {
|
||||
$Criteria->addDescendingOrderByColumn( $sort );
|
||||
//Add sortable options
|
||||
if ($sort != "") {
|
||||
//Current delegation (*)
|
||||
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
|
||||
switch ($sort) {
|
||||
case "APP_CACHE_VIEW.APP_CURRENT_USER":
|
||||
$sort = "USRCR_USR_LASTNAME";
|
||||
|
||||
$confEnvSetting = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "");
|
||||
|
||||
if (is_array($confEnvSetting)) {
|
||||
$arrayAux = explode(" ", str_replace(array("(", ")", ","), array(null, null, null), $confEnvSetting["format"]));
|
||||
|
||||
if (isset($arrayAux[0])) {
|
||||
switch (trim($arrayAux[0])) {
|
||||
case "@userName":
|
||||
$sort = "USRCR_USR_USERNAME";
|
||||
break;
|
||||
case "@firstName":
|
||||
$sort = "USRCR_USR_FIRSTNAME";
|
||||
break;
|
||||
case "@lastName":
|
||||
$sort = "USRCR_USR_LASTNAME";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "APP_CACHE_VIEW.APP_TAS_TITLE":
|
||||
$sort = "APPCVCR_APP_TAS_TITLE";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$Criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$Criteria->addAscendingOrderByColumn( $sort );
|
||||
$Criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,7 +476,7 @@ class Applications
|
||||
$maxDataset->close();
|
||||
}*/
|
||||
|
||||
//Current delegation
|
||||
//Current delegation (*)
|
||||
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
|
||||
//Current task
|
||||
$aRow["APP_TAS_TITLE"] = $aRow["APPCVCR_APP_TAS_TITLE"];
|
||||
|
||||
@@ -591,7 +591,7 @@ class ReportTables
|
||||
if (! isset( $aFields[$aField['sFieldName']] )) {
|
||||
$aFields[$aField['sFieldName']] = '';
|
||||
}
|
||||
$sQuery .= "'" . (isset( $aFields[$aField['sFieldName']] ) ? mysql_real_escape_string( $aFields[$aField['sFieldName']] ) : '') . "',";
|
||||
$sQuery .= "'" . (isset( $aFields[$aField['sFieldName']] ) ? @mysql_real_escape_string( $aFields[$aField['sFieldName']] ) : '') . "',";
|
||||
break;
|
||||
case 'date':
|
||||
$mysqlDate = (isset( $aFields[$aField['sFieldName']] ) ? $aFields[$aField['sFieldName']] : '');
|
||||
@@ -646,6 +646,7 @@ class ReportTables
|
||||
|
||||
$aAux = explode( '-', $aRow['REP_TAB_GRID'] );
|
||||
if (isset( $aFields[$aAux[0]] )) {
|
||||
if (is_array($aFields[$aAux[0]])) {
|
||||
foreach ($aFields[$aAux[0]] as $iRow => $aGridRow) {
|
||||
$sQuery = 'INSERT INTO `' . $aRow['REP_TAB_NAME'] . '` (';
|
||||
$sQuery .= '`APP_UID`,`APP_NUMBER`,`ROW`';
|
||||
@@ -675,6 +676,7 @@ class ReportTables
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/**
|
||||
|
||||
@@ -142,6 +142,11 @@ class Users extends BaseUsers
|
||||
$aFields["USR_CITY_NAME"] = (!empty($aIsoSubdivision["IS_NAME"]))? $aIsoSubdivision["IS_NAME"] : "";
|
||||
$aFields["USR_LOCATION_NAME"] = (!empty($aIsoLocation["IL_NAME"]))? $aIsoLocation["IL_NAME"] : "";
|
||||
|
||||
require_once PATH_RBAC . "model/Roles.php";
|
||||
$roles = new Roles();
|
||||
$role = $roles->loadByCode($aFields['USR_ROLE']);
|
||||
$aFields['USR_ROLE_NAME'] = $role['ROL_NAME'];
|
||||
|
||||
$result = $aFields;
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -10036,8 +10036,8 @@ msgstr "Please select a photo"
|
||||
# TRANSLATION
|
||||
# LABEL/ID_RESUME
|
||||
#: LABEL/ID_RESUME
|
||||
msgid "Résumé"
|
||||
msgstr "Résumé"
|
||||
msgid "Resume"
|
||||
msgstr "Resume"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_USER_ID
|
||||
|
||||
@@ -319,7 +319,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
if ($isReportTable && $alterTable) {
|
||||
// the table was create successfully but we're catching problems while populating table
|
||||
try {
|
||||
$oAdditionalTables->populateReportTable( $data['REP_TAB_NAME'], $pmTable->getDataSource(), $data['REP_TAB_TYPE'], $data['PRO_UID'], $data['REP_TAB_GRID'], $addTabData['ADD_TAB_UID'] );
|
||||
$oAdditionalTables->populateReportTable( $data['REP_TAB_NAME'], $pmTable->getDataSource(), $data['REP_TAB_TYPE'], $data['PRO_UID'], $data['REP_TAB_GRID'], $addTabUid );
|
||||
} catch (Exception $e) {
|
||||
$result->message = $result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
@@ -4751,7 +4751,7 @@ SELECT 'LABEL','ID_PROFILE','en','Profile','2012-06-01'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_PLEASE_SELECT_PHOTO','en','Please select a photo','2012-06-01'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_RESUME','en','Résumé','2012-06-01'
|
||||
SELECT 'LABEL','ID_RESUME','en','Resume','2012-06-01'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_USER_ID','en','User ID (*)','2012-06-01'
|
||||
UNION ALL
|
||||
|
||||
@@ -3081,7 +3081,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_EMAIL_ENTER_VALID','en','Please enter a valid email address.','2012-06-01') ,
|
||||
( 'LABEL','ID_PROFILE','en','Profile','2012-06-01') ,
|
||||
( 'LABEL','ID_PLEASE_SELECT_PHOTO','en','Please select a photo','2012-06-01') ,
|
||||
( 'LABEL','ID_RESUME','en','Résumé','2012-06-01') ,
|
||||
( 'LABEL','ID_RESUME','en','Resume','2012-06-01') ,
|
||||
( 'LABEL','ID_USER_ID','en','User ID (*)','2012-06-01') ,
|
||||
( 'LABEL','ID_PHONE','en','Phone','2012-06-01') ,
|
||||
( 'LABEL','ID_NEW_PASSWORD','en','New Password','2012-06-01') ,
|
||||
|
||||
@@ -97,7 +97,7 @@ switch ($_POST['action']) {
|
||||
$roles = new Roles();
|
||||
$rolesData = $roles->getAllRoles();
|
||||
foreach ($rolesData as $rowid => $row) {
|
||||
$oData[] = array('ROL_UID' => $row['ROL_CODE'], 'ROL_CODE' => $row['ROL_CODE']);
|
||||
$oData[] = array('ROL_UID' => $row['ROL_CODE'], 'ROL_CODE' => $row['ROL_NAME']);
|
||||
}
|
||||
print (G::json_encode($oData));
|
||||
break;
|
||||
@@ -613,4 +613,3 @@ switch ($_POST['action']) {
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ Export.submit = function()
|
||||
if (result.success) {
|
||||
location.href = result.link;
|
||||
} else {
|
||||
PMExt.error(_('ID_ERROR'), result.message));
|
||||
PMExt.error(_('ID_ERROR'), result.message);
|
||||
}
|
||||
},
|
||||
failure: function(obj, resp){
|
||||
|
||||
@@ -1196,7 +1196,7 @@ function loadUserData()
|
||||
Ext.getCmp("USR_REPLACED_BY2").setText(data.user.REPLACED_NAME);
|
||||
Ext.getCmp("USR_DUE_DATE2").setText(data.user.USR_DUE_DATE);
|
||||
Ext.getCmp("USR_STATUS2").setText(_('ID_' + data.user.USR_STATUS));
|
||||
Ext.getCmp("USR_ROLE2").setText(data.user.USR_ROLE);
|
||||
Ext.getCmp("USR_ROLE2").setText(data.user.USR_ROLE_NAME);
|
||||
|
||||
Ext.getCmp("PREF_DEFAULT_MAIN_MENU_OPTION2").setText(data.user.MENUSELECTED_NAME);
|
||||
Ext.getCmp("PREF_DEFAULT_CASES_MENUSELECTED2").setText(data.user.CASES_MENUSELECTED_NAME);
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<en>Show print dynaform button</en>
|
||||
</PRINTDYNAFORM>
|
||||
|
||||
<ADJUSTGRIDSWIDTH type="checkbox" falseValue="0" value="0" defaultvalue="0" labelOnRight="0">
|
||||
<ADJUSTGRIDSWIDTH type="checkbox" falseValue="0" value="1" defaultvalue="0" labelOnRight="0">
|
||||
<en>Adjust the grid width to the width of the main form</en>
|
||||
</ADJUSTGRIDSWIDTH>
|
||||
<!--<ENABLETEMPLATE type="checkbox" value="1" defaultvalue="0" labelOnRight="0">
|
||||
|
||||
Reference in New Issue
Block a user