Merge branch 'master' of bitbucket.org:qronald/processmaker
This commit is contained in:
@@ -64,6 +64,18 @@ class actionsByEmailClass extends PMPlugin
|
||||
$cases = new Cases();
|
||||
$caseFields = $cases->loadCase($data->APP_UID);
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_UID);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_TYPE);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_TEMPLATE);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_DYN_TYPE);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::DYN_UID);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_FIELD);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_FIELD);
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_CONTENT);
|
||||
$criteria->addJoin( AbeConfigurationPeer::DYN_UID, DynaformPeer::DYN_UID, Criteria::LEFT_JOIN );
|
||||
$criteria->add(AbeConfigurationPeer::PRO_UID, $caseFields['PRO_UID']);
|
||||
$criteria->add(AbeConfigurationPeer::TAS_UID, $data->TAS_UID);
|
||||
$result = AbeConfigurationPeer::doSelectRS($criteria);
|
||||
@@ -82,7 +94,10 @@ class actionsByEmailClass extends PMPlugin
|
||||
}
|
||||
|
||||
if ($email != '') {
|
||||
$subject = $caseFields['APP_TITLE'];
|
||||
$subject = G::replaceDataField( $configuration['ABE_SUBJECT_FIELD'], $caseFields['APP_DATA'] );
|
||||
if($subject == ''){
|
||||
$subject = $caseFields['APP_TITLE'];
|
||||
}
|
||||
|
||||
// Create
|
||||
require_once 'classes/model/AbeRequests.php';
|
||||
@@ -122,7 +137,7 @@ class actionsByEmailClass extends PMPlugin
|
||||
switch ($configuration['ABE_TYPE']) {
|
||||
case 'LINK':
|
||||
// $__ABE__ .= $dynaform->render(PATH_FEATURES . 'actionsByEmail/xmlform.html', $scriptCode) . '<br />';
|
||||
$__ABE__ .= '<a href="' . $link . 'dataForm?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&DYN_UID=' . G::encrypt($configuration['DYN_UID'], URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Please complete this form</a>';
|
||||
$__ABE__ .= '<a href="' . $link . 'DataForm?APP_UID=' . G::encrypt($data->APP_UID, URL_KEY) . '&DEL_INDEX=' . G::encrypt($data->DEL_INDEX, URL_KEY) . '&DYN_UID=' . G::encrypt($configuration['DYN_UID'], URL_KEY) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY) . '" target="_blank">Please complete this form</a>';
|
||||
break;
|
||||
// coment
|
||||
case 'FIELD':
|
||||
@@ -133,19 +148,31 @@ class actionsByEmailClass extends PMPlugin
|
||||
$field->type = 'dropdown';
|
||||
$field->options = array();
|
||||
$actionField = str_replace('@@', '', $configuration['ABE_ACTION_FIELD']);
|
||||
foreach ($variables as $variable) {
|
||||
if ($variable['var_name'] == $actionField) {
|
||||
$field->label = $variable['var_name'];
|
||||
$field->type = 'dropdown';
|
||||
$values = json_decode($variable['var_accepted_values']);
|
||||
foreach ($values as $value) {
|
||||
$field->options[$value->keyValue] = $value->value;
|
||||
$dynaform = $configuration['DYN_UID'];
|
||||
$variables = G::json_decode($configuration['DYN_CONTENT'], true);
|
||||
if(isset($variables['items'][0]['items'])){
|
||||
$fields = $variables['items'][0]['items'];
|
||||
foreach ($fields as $key => $value) {
|
||||
foreach($value as $var){ G::pr($var);
|
||||
if(isset($var['variable'])){
|
||||
if ($var['variable'] == $actionField) {
|
||||
$field->label = $var['label'];
|
||||
$field->type = $var['type'];
|
||||
$values = $var['options'];
|
||||
foreach ($values as $val){
|
||||
$field->options[$val['value']] = $val['value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G::LoadClass('pmDynaform');
|
||||
$obj = new pmDynaform($configuration['DYN_UID']);
|
||||
$configuration['CURRENT_DYNAFORM'] = $configuration['DYN_UID'];
|
||||
$file = $obj->printPmDynaformAbe($configuration);
|
||||
$__ABE__ .= $file;
|
||||
$__ABE__ .= '<strong>' . $field->label . '</strong><br /><table align="left" border="0"><tr>';
|
||||
|
||||
switch ($field->type) {
|
||||
case 'dropdown':
|
||||
case 'radiogroup':
|
||||
|
||||
@@ -70,9 +70,9 @@ abstract class IndicatorDataSourcesEnum extends BasicEnum {
|
||||
|
||||
class indicatorsCalculator
|
||||
{
|
||||
private $userReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "USR_UID");
|
||||
private $userReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
|
||||
private $processReportingMetadata = array("tableName" => "PRO_REPORTING", "keyField" => "PRO_UID");
|
||||
private $userGroupReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "USR_UID");
|
||||
private $userGroupReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
|
||||
private $processCategoryReportingMetadata = array("tableName" => "PRO_REPORTING", "keyField" => "PRO_UID");
|
||||
|
||||
private $peiCostFormula = "SUM(TOTAL_CASES_OUT * CONFIGURED_TASK_TIME - TOTAL_TIME_BY_TASK * USER_HOUR_COST)";
|
||||
@@ -750,6 +750,7 @@ class indicatorsCalculator
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* For debug only:
|
||||
* public function interpolateQuery($query, $params) {
|
||||
$keys = array();
|
||||
|
||||
@@ -456,6 +456,39 @@ class pmDynaform
|
||||
exit();
|
||||
}
|
||||
|
||||
public function printABE($filename, $record)
|
||||
{
|
||||
ob_clean();
|
||||
$this->record = $record;
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
$this->jsonr($json);
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var __DynaformName__ = null;\n" .
|
||||
"var app_uid = null;\n" .
|
||||
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
|
||||
"var step_mode = null;\n" .
|
||||
"var workspace = '" . SYS_SYS . "';\n" .
|
||||
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
|
||||
"var filePost = '" . $filename . "';\n" .
|
||||
"var fieldsRequired = " . G::json_encode(array()) . ";\n" .
|
||||
"var triggerDebug = null;\n" .
|
||||
"</script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
|
||||
" <a id='dyn_forward' href='' style='float:right;font-size:12px;line-height:1;margin:0px 5px 1px 0px;'>\n" .
|
||||
" </a>\n" .
|
||||
"</div>";
|
||||
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
echo $file;
|
||||
exit();
|
||||
}
|
||||
|
||||
public function printPmDynaform()
|
||||
{
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
@@ -472,6 +505,34 @@ class pmDynaform
|
||||
exit();
|
||||
}
|
||||
|
||||
public function printPmDynaformAbe($record)
|
||||
{
|
||||
ob_clean();
|
||||
$this->record = $record;
|
||||
$json = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
$this->jsonr($json);
|
||||
$javascrip = "" .
|
||||
"<script type='text/javascript'>\n" .
|
||||
"var jsondata = " . G::json_encode($json) . ";\n" .
|
||||
"var pm_run_outside_main_app = null;\n" .
|
||||
"var dyn_uid = '" . $this->fields["CURRENT_DYNAFORM"] . "';\n" .
|
||||
"var __DynaformName__ = null;\n" .
|
||||
"var app_uid = null;\n" .
|
||||
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
|
||||
"var step_mode = null;\n" .
|
||||
"var workspace = '" . SYS_SYS . "';\n" .
|
||||
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
|
||||
"var fieldsRequired = " . G::json_encode(array()) . ";\n" .
|
||||
"var triggerDebug = null;\n" .
|
||||
"</script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
|
||||
"</div>";
|
||||
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
|
||||
$file = str_replace("{javascript}", $javascrip, $file);
|
||||
return $file;
|
||||
}
|
||||
|
||||
public function synchronizeVariable($processUid, $newVariable, $oldVariable)
|
||||
{
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
@@ -18,7 +18,7 @@ class AbeConfiguration extends BaseAbeConfiguration
|
||||
|
||||
private $filterThisFields = array('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE',
|
||||
'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID','ABE_EMAIL_FIELD',
|
||||
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE');
|
||||
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD');
|
||||
|
||||
public function load($abeUid)
|
||||
{
|
||||
|
||||
@@ -523,10 +523,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
//getting the calendar
|
||||
$calendar->getCalendar($row['USR_UID'], $row['PRO_UID'], $row['TAS_UID']);
|
||||
$calData = $calendar->getCalendarData();
|
||||
|
||||
//Recalculating DueDate with the user calendar if it exist. It allways will take the derivation date like initial date.
|
||||
$iDueDate = $calendar->dashCalculateDate($row['DEL_DELEGATE_DATE'], $fTaskDuration, $fTaskDurationUnit, $calData);
|
||||
|
||||
|
||||
//if the task is not started
|
||||
if ($isStarted == 0) {
|
||||
if ($row['DEL_INIT_DATE'] != null && $row['DEL_INIT_DATE'] != '') {
|
||||
@@ -562,7 +559,6 @@ class AppDelegation extends BaseAppDelegation
|
||||
//$delDuration = $this->getDiffDate( $iFinishDate, $iInitDate );
|
||||
$delDuration = $calendar->dashCalculateDurationWithCalendar($row['DEL_INIT_DATE'], $row['DEL_FINISH_DATE'], $calData );//by jen
|
||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
||||
|
||||
$oAppDel->setDelDuration( $delDuration );
|
||||
//calculate due date if correspond
|
||||
$dueDate = strtotime($iDueDate);
|
||||
@@ -592,8 +588,12 @@ class AppDelegation extends BaseAppDelegation
|
||||
|
||||
//we are putting negative number if the task is not delayed, and positive number for the time the task is delayed
|
||||
//$delayDuration = $this->getDiffDate( $now, $iDueDate );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, date("Y-m-d H:i:s"), $calData );
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||
$delayDuration = 0;
|
||||
if($now > $iDueDate){
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, date("Y-m-d H:i:s"), $calData );
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60);
|
||||
}
|
||||
//Days
|
||||
$oAppDel->setDelDelayDuration( $delayDuration );
|
||||
if ($fTaskDuration != 0) {
|
||||
$overduePercentage = $delayDuration / $fTaskDuration;
|
||||
|
||||
@@ -1,46 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Configuration.php
|
||||
* @package workflow.engine.classes.model
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
if (!class_exists('BaseConfiguration')) {
|
||||
require_once 'classes/model/om/BaseConfiguration.php';
|
||||
}
|
||||
//require_once 'classes/model/Content.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'CONFIGURATION' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class Configuration extends BaseConfiguration
|
||||
{
|
||||
public function create($aData)
|
||||
@@ -128,9 +86,9 @@ class Configuration extends BaseConfiguration
|
||||
}
|
||||
|
||||
/**
|
||||
* To check if the configuration row exists, by using Configuration Uid data
|
||||
* To check if the configuration row exists, by using Configuration Uid data
|
||||
*/
|
||||
public function exists($CfgUid, $ObjUid='', $ProUid='', $UsrUid='', $AppUid='')
|
||||
public function exists($CfgUid, $ObjUid = "", $ProUid = "", $UsrUid = "", $AppUid = "")
|
||||
{
|
||||
$oRow = ConfigurationPeer::retrieveByPK( $CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid );
|
||||
return (( get_class ($oRow) == 'Configuration' )&&(!is_null($oRow)));
|
||||
|
||||
@@ -1,48 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* ConfigurationPeer.php
|
||||
* @package workflow.engine.classes.model
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseConfigurationPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/Configuration.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'CONFIGURATION' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ConfigurationPeer extends BaseConfigurationPeer
|
||||
{
|
||||
private static $arrayRecord = array();
|
||||
|
||||
public static function retrieveByPK($cfg_uid, $obj_uid, $pro_uid, $usr_uid, $app_uid, $con = null)
|
||||
{
|
||||
try {
|
||||
$record = null;
|
||||
|
||||
switch ($cfg_uid) {
|
||||
case "ENVIRONMENT_SETTINGS":
|
||||
if (!isset(self::$arrayRecord["ENVIRONMENT_SETTINGS"])) {
|
||||
self::$arrayRecord["ENVIRONMENT_SETTINGS"] = parent::retrieveByPK($cfg_uid, $obj_uid, $pro_uid, $usr_uid, $app_uid, $con);
|
||||
}
|
||||
|
||||
$record = self::$arrayRecord["ENVIRONMENT_SETTINGS"];
|
||||
break;
|
||||
default:
|
||||
$record = parent::retrieveByPK($cfg_uid, $obj_uid, $pro_uid, $usr_uid, $app_uid, $con);
|
||||
break;
|
||||
}
|
||||
|
||||
//Return
|
||||
return $record;
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class DashboardIndicator extends BaseDashboardIndicator
|
||||
$rs = DashboardIndicatorPeer::doSelectRS( $criteria );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$dashboardIndicator = array();
|
||||
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
|
||||
|
||||
@@ -1,46 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Language.php
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
//require_once 'classes/model/om/BaseLanguage.php';
|
||||
//require_once 'classes/model/Content.php';
|
||||
//require_once 'classes/model/IsoCountry.php';
|
||||
//require_once 'classes/model/Translation.php';
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LANGUAGE' table.
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class Language extends BaseLanguage
|
||||
{
|
||||
private static $arrayRecord = array();
|
||||
|
||||
private $exceptionFields = array ('','javascript','hidden','phpvariable','private','toolbar','xmlmenu','toolbutton','cellmark','grid','CheckboxTable');
|
||||
|
||||
public function load ($sLanUid)
|
||||
@@ -130,16 +92,32 @@ class Language extends BaseLanguage
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
public function findLocationByLanId ($LAN_ID)
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( LanguagePeer::LAN_LOCATION );
|
||||
$oCriteria->add( LanguagePeer::LAN_ID, $LAN_ID, Criteria::LIKE );
|
||||
$oDataset = LanguagePeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
public function findLocationByLanId($languageId)
|
||||
{
|
||||
try {
|
||||
if (!isset(self::$arrayRecord[$languageId])) {
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(LanguagePeer::LAN_LOCATION);
|
||||
$criteria->add(LanguagePeer::LAN_ID, $languageId, Criteria::LIKE);
|
||||
|
||||
$rsCriteria = LanguagePeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rsCriteria->next();
|
||||
|
||||
self::$arrayRecord[$languageId] = $rsCriteria->getRow();
|
||||
}
|
||||
|
||||
$record = self::$arrayRecord[$languageId];
|
||||
|
||||
//Return
|
||||
return $record;
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Import a language file
|
||||
*
|
||||
|
||||
@@ -1,47 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* LanguagePeer.php
|
||||
* @package workflow.engine.classes.model
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseLanguagePeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/Language.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LANGUAGE' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class LanguagePeer extends BaseLanguagePeer
|
||||
{
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ class AbeConfigurationMapBuilder
|
||||
|
||||
$tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('ABE_SUBJECT_FIELD', 'AbeSubjectField', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
} // doBuild()
|
||||
|
||||
} // AbeConfigurationMapBuilder
|
||||
|
||||
@@ -99,6 +99,12 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $abe_update_date;
|
||||
|
||||
/**
|
||||
* The value for the abe_subject_field field.
|
||||
* @var string
|
||||
*/
|
||||
protected $abe_subject_field;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -287,6 +293,17 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [abe_subject_field] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAbeSubjectField()
|
||||
{
|
||||
|
||||
return $this->abe_subject_field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [abe_uid] column.
|
||||
*
|
||||
@@ -565,6 +582,28 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
|
||||
} // setAbeUpdateDate()
|
||||
|
||||
/**
|
||||
* Set the value of [abe_subject_field] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAbeSubjectField($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->abe_subject_field !== $v || $v === '') {
|
||||
$this->abe_subject_field = $v;
|
||||
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_SUBJECT_FIELD;
|
||||
}
|
||||
|
||||
} // setAbeSubjectField()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -606,12 +645,14 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
|
||||
$this->abe_update_date = $rs->getTimestamp($startcol + 11, null);
|
||||
|
||||
$this->abe_subject_field = $rs->getString($startcol + 12, null);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 12; // 12 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 13; // 13 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating AbeConfiguration object", $e);
|
||||
@@ -851,6 +892,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
case 11:
|
||||
return $this->getAbeUpdateDate();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getAbeSubjectField();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -883,6 +927,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
$keys[9] => $this->getAbeCaseNoteInResponse(),
|
||||
$keys[10] => $this->getAbeCreateDate(),
|
||||
$keys[11] => $this->getAbeUpdateDate(),
|
||||
$keys[12] => $this->getAbeSubjectField(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -950,6 +995,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
case 11:
|
||||
$this->setAbeUpdateDate($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setAbeSubjectField($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1021,6 +1069,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
$this->setAbeUpdateDate($arr[$keys[11]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setAbeSubjectField($arr[$keys[12]]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1080,6 +1131,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
$criteria->add(AbeConfigurationPeer::ABE_UPDATE_DATE, $this->abe_update_date);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AbeConfigurationPeer::ABE_SUBJECT_FIELD)) {
|
||||
$criteria->add(AbeConfigurationPeer::ABE_SUBJECT_FIELD, $this->abe_subject_field);
|
||||
}
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1156,6 +1210,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAbeUpdateDate($this->abe_update_date);
|
||||
|
||||
$copyObj->setAbeSubjectField($this->abe_subject_field);
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@ abstract class BaseAbeConfigurationPeer
|
||||
/** the column name for the ABE_UPDATE_DATE field */
|
||||
const ABE_UPDATE_DATE = 'ABE_CONFIGURATION.ABE_UPDATE_DATE';
|
||||
|
||||
/** the column name for the ABE_SUBJECT_FIELD field */
|
||||
const ABE_SUBJECT_FIELD = 'ABE_CONFIGURATION.ABE_SUBJECT_FIELD';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -78,10 +81,10 @@ abstract class BaseAbeConfigurationPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -91,10 +94,10 @@ abstract class BaseAbeConfigurationPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, 'AbeSubjectField' => 12, ),
|
||||
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 12, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, 'ABE_SUBJECT_FIELD' => 12, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -219,6 +222,8 @@ abstract class BaseAbeConfigurationPeer
|
||||
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_UPDATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)';
|
||||
|
||||
@@ -4629,6 +4629,16 @@
|
||||
<parameter name="Extra" value=""/>
|
||||
</vendor>
|
||||
</column>
|
||||
<column name="ABE_SUBJECT_FIELD" type="VARCHAR" size="100" required="false" default="">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Field" value="ABE_SUBJECT_FIELD"/>
|
||||
<parameter name="Type" value="varchar(100)"/>
|
||||
<parameter name="Null" value="NO"/>
|
||||
<parameter name="Key" value=""/>
|
||||
<parameter name="Default" value=""/>
|
||||
<parameter name="Extra" value=""/>
|
||||
</vendor>
|
||||
</column>
|
||||
</table>
|
||||
|
||||
<table name="ABE_REQUESTS">
|
||||
|
||||
@@ -210,6 +210,13 @@ class StrategicDashboard extends Controller
|
||||
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
|
||||
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
|
||||
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
|
||||
$translation['ID_NO_INEFFICIENT_PROCESSES'] = G::LoadTranslation('ID_NO_INEFFICIENT_PROCESSES');
|
||||
$translation['ID_NO_INEFFICIENT_TASKS'] = G::LoadTranslation('ID_NO_INEFFICIENT_TASKS');
|
||||
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
|
||||
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
|
||||
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
|
||||
$translation['ID_EMPTY'] = G::LoadTranslation('ID_EMPTY');
|
||||
$translation['ID_INBOX'] = G::LoadTranslation('ID_INBOX');
|
||||
|
||||
$this->setVar('translation', $translation);
|
||||
$this->render();
|
||||
@@ -254,6 +261,14 @@ class StrategicDashboard extends Controller
|
||||
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
|
||||
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
|
||||
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
|
||||
$translation['ID_NO_INEFFICIENT_PROCESSES'] = G::LoadTranslation('ID_NO_INEFFICIENT_PROCESSES');
|
||||
$translation['ID_NO_INEFFICIENT_TASKS'] = G::LoadTranslation('ID_NO_INEFFICIENT_TASKS');
|
||||
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
|
||||
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
|
||||
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
|
||||
$translation['ID_EMPTY'] = G::LoadTranslation('ID_EMPTY');
|
||||
$translation['ID_INBOX'] = G::LoadTranslation('ID_INBOX');
|
||||
|
||||
|
||||
$this->setVar('translation', $translation);
|
||||
$this->render();
|
||||
|
||||
@@ -2644,6 +2644,7 @@ CREATE TABLE `ABE_CONFIGURATION`
|
||||
`ABE_CASE_NOTE_IN_RESPONSE` INTEGER default 0,
|
||||
`ABE_CREATE_DATE` DATETIME NOT NULL,
|
||||
`ABE_UPDATE_DATE` DATETIME,
|
||||
`ABE_SUBJECT_FIELD` VARCHAR(100) default '' NOT NULL,
|
||||
PRIMARY KEY (`ABE_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,6 @@ var ViewDashboardHelper = function () {
|
||||
ViewDashboardHelper.prototype.userDashboards = function(userId, callBack) {
|
||||
};
|
||||
|
||||
//TODO refactor to a good name...
|
||||
ViewDashboardHelper.prototype.stringIfNull = function (val){
|
||||
if(val === null || val == undefined || val == "?"){
|
||||
val = "?";
|
||||
|
||||
@@ -269,7 +269,6 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
|
||||
});
|
||||
|
||||
var retval = data;
|
||||
//TODO selecte de 7 worst cases no the first 7
|
||||
retval.graph1Data = this.orderGraphData(graph1Data, "down").splice(0,7)
|
||||
retval.graph2Data = this.orderGraphData(graph2Data, "down").splice(0,7)
|
||||
retval.graph3Data = this.orderGraphData(graph3Data, "down").splice(0,7)
|
||||
|
||||
@@ -464,9 +464,9 @@ var loadIndicator = function (indicatorId, initDate, endDate) {
|
||||
fillGeneralIndicatorFirstView(viewModel);
|
||||
break;
|
||||
}
|
||||
hideScrollIfAllDivsAreVisible();
|
||||
hideTitleAndSortDiv();
|
||||
});
|
||||
hideScrollIfAllDivsAreVisible();
|
||||
hideTitleAndSortDiv();
|
||||
}
|
||||
|
||||
var setIndicatorActiveMarker = function () {
|
||||
|
||||
61
workflow/engine/methods/services/ActionsByEmailDataForm.php
Executable file
61
workflow/engine/methods/services/ActionsByEmailDataForm.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
if (PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
try {
|
||||
// Validations
|
||||
if (!isset($_REQUEST['APP_UID'])) {
|
||||
$_REQUEST['APP_UID'] = '';
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['DEL_INDEX'])) {
|
||||
$_REQUEST['DEL_INDEX'] = '';
|
||||
}
|
||||
|
||||
if ($_REQUEST['APP_UID'] == '') {
|
||||
throw new Exception('The parameter APP_UID is empty.');
|
||||
}
|
||||
|
||||
if ($_REQUEST['DEL_INDEX'] == '') {
|
||||
throw new Exception('The parameter DEL_INDEX is empty.');
|
||||
}
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass('pmDynaform');
|
||||
|
||||
$cases = new Cases();
|
||||
$caseFields = $cases->loadCase(G::decrypt($_REQUEST['APP_UID'], URL_KEY),G::decrypt($_REQUEST['DEL_INDEX'], URL_KEY));
|
||||
|
||||
//
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_CONTENT);
|
||||
$criteria->addSelectColumn(DynaformPeer::PRO_UID);
|
||||
$criteria->add(DynaformPeer::DYN_UID, G::decrypt($_REQUEST['DYN_UID'], URL_KEY));
|
||||
$result = DynaformPeer::doSelectRS($criteria);
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$result->next();
|
||||
$configuration = $result->getRow();
|
||||
$a = new pmDynaform(G::decrypt($_REQUEST['DYN_UID'], URL_KEY));
|
||||
$action = 'ActionsByEmailDataFormPost.php?APP_UID=' . $_REQUEST['APP_UID'] . '&DEL_INDEX=' . $_REQUEST['DEL_INDEX'] . '&ABER=' . $_REQUEST['ABER'];
|
||||
$record['DYN_CONTENT'] = $configuration['DYN_CONTENT'];
|
||||
$record['PRO_UID'] = $configuration['PRO_UID'];
|
||||
$record['CURRENT_DYNAFORM'] = G::decrypt($_REQUEST['DYN_UID'], URL_KEY);
|
||||
$record['APP_UID'] = $_REQUEST['APP_UID'];
|
||||
$record['DEL_INDEX'] = $_REQUEST['DEL_INDEX'];
|
||||
$record['ABER'] = $_REQUEST['ABER'];
|
||||
if (is_null($caseFields['DEL_FINISH_DATE'])) {
|
||||
$a->printABE($action,$record);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', array('MESSAGE' => '<strong>The form has already been filled and sent.</strong>'));
|
||||
}
|
||||
} catch (Exception $error) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', array('MESSAGE' => $error->getMessage()));
|
||||
}
|
||||
|
||||
G::RenderPage('publish', 'blank');
|
||||
}
|
||||
|
||||
209
workflow/engine/methods/services/ActionsByEmailDataFormPost.php
Executable file
209
workflow/engine/methods/services/ActionsByEmailDataFormPost.php
Executable file
@@ -0,0 +1,209 @@
|
||||
<?php
|
||||
|
||||
if (PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
try {
|
||||
if ($_REQUEST['APP_UID'] == '') {
|
||||
if($_GET['APP_UID'] == ''){
|
||||
throw new Exception('The parameter APP_UID is empty.');
|
||||
} else {
|
||||
$_REQUEST['APP_UID'] = $_GET['APP_UID'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($_REQUEST['DEL_INDEX'] == '') {
|
||||
throw new Exception('The parameter DEL_INDEX is empty.');
|
||||
}
|
||||
|
||||
if ($_REQUEST['ABER'] == '') {
|
||||
throw new Exception('The parameter ABER is empty.');
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['form'])) {
|
||||
$_REQUEST['form'] = array();
|
||||
}
|
||||
|
||||
$_REQUEST['APP_UID'] = G::decrypt($_REQUEST['APP_UID'], URL_KEY);
|
||||
$_REQUEST['DEL_INDEX'] = G::decrypt($_REQUEST['DEL_INDEX'], URL_KEY);
|
||||
$_REQUEST['ABER'] = G::decrypt($_REQUEST['ABER'], URL_KEY);
|
||||
G::LoadClass('case');
|
||||
|
||||
$case = new Cases();
|
||||
$casesFields = $case->loadCase($_REQUEST['APP_UID'], $_REQUEST['DEL_INDEX']);
|
||||
|
||||
$casesFields['APP_DATA'] = array_merge($casesFields['APP_DATA'], $_REQUEST['form']);
|
||||
|
||||
//Get user info
|
||||
$current_user_uid = null;
|
||||
$currentUsrName = null;
|
||||
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(AppDelegationPeer::USR_UID);
|
||||
$criteria->add(AppDelegationPeer::APP_UID, $_REQUEST["APP_UID"]);
|
||||
$criteria->add(AppDelegationPeer::DEL_INDEX, $_REQUEST["DEL_INDEX"]);
|
||||
|
||||
$rsSQL = AppDelegationPeer::doSelectRS($criteria);
|
||||
$rsSQL->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rsSQL->next()) {
|
||||
$row = $rsSQL->getRow();
|
||||
|
||||
$current_user_uid = $row["USR_UID"];
|
||||
}
|
||||
|
||||
if ($current_user_uid != null) {
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$criteria->add(UsersPeer::USR_UID, $current_user_uid);
|
||||
|
||||
$rsSQL = UsersPeer::doSelectRS($criteria);
|
||||
$rsSQL->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rsSQL->next();
|
||||
|
||||
$row = $rsSQL->getRow();
|
||||
$currentUsrName = $row["USR_USERNAME"];
|
||||
|
||||
$casesFields["APP_DATA"]["USER_LOGGED"] = $current_user_uid;
|
||||
$casesFields["APP_DATA"]["USR_USERNAME"] = $currentUsrName;
|
||||
}
|
||||
|
||||
foreach ($casesFields["APP_DATA"] as $index => $value) {
|
||||
$_SESSION[$index] = $value;
|
||||
}
|
||||
|
||||
//Update case info
|
||||
$case->updateCase($_REQUEST['APP_UID'], $casesFields);
|
||||
|
||||
G::LoadClass('wsBase');
|
||||
|
||||
$wsBaseInstance = new wsBase();
|
||||
$result = $wsBaseInstance->derivateCase($casesFields['CURRENT_USER_UID'], $_REQUEST['APP_UID'], $_REQUEST ['DEL_INDEX'], true);
|
||||
$code = (is_array($result) ? $result['status_code'] : $result->status_code);
|
||||
|
||||
$dataResponses = array();
|
||||
$dataResponses['ABE_REQ_UID'] = $_REQUEST['ABER'];
|
||||
$dataResponses['ABE_RES_CLIENT_IP'] = $_SERVER['REMOTE_ADDR'];
|
||||
$dataResponses['ABE_RES_DATA'] = serialize($_REQUEST['form']);
|
||||
$dataResponses['ABE_RES_STATUS'] = 'PENDING';
|
||||
$dataResponses['ABE_RES_MESSAGE'] = '';
|
||||
|
||||
try {
|
||||
set_include_path(PATH_PLUGINS . 'actionsByEmail' . PATH_SEPARATOR . get_include_path());
|
||||
require_once 'classes/model/AbeResponses.php';
|
||||
|
||||
$abeAbeResponsesInstance = new AbeResponses();
|
||||
$dataResponses['ABE_RES_UID'] = $abeAbeResponsesInstance->createOrUpdate($dataResponses);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
|
||||
if ($code == 0) {
|
||||
//Save Cases Notes
|
||||
include_once 'utils.php';
|
||||
|
||||
$dataAbeRequests = loadAbeRequest($_REQUEST['ABER']);
|
||||
$dataAbeConfiguration = loadAbeConfiguration($dataAbeRequests['ABE_UID']);
|
||||
|
||||
if ($dataAbeConfiguration['ABE_CASE_NOTE_IN_RESPONSE'] == 1) {
|
||||
$response = new stdclass();
|
||||
$response->usrUid = $casesFields['APP_DATA']['USER_LOGGED'];
|
||||
$response->appUid = $_REQUEST['APP_UID'];
|
||||
$response->noteText = "Check the information that was sent for the receiver: " . $dataAbeRequests['ABE_REQ_SENT_TO'];
|
||||
|
||||
postNote($response);
|
||||
}
|
||||
|
||||
$dataAbeRequests['ABE_REQ_ANSWERED'] = 1;
|
||||
$code == 0 ? uploadAbeRequest($dataAbeRequests) : '';
|
||||
|
||||
if (isset ( $_FILES ['form'] )) {
|
||||
foreach ($_FILES ['form'] ['name'] as $fieldName => $value) {
|
||||
if ($_FILES ['form'] ['error'] [$fieldName] == 0) {
|
||||
$appDocument = new AppDocument ( );
|
||||
|
||||
if ( isset ( $_REQUEST['INPUTS'] [$fieldName] ) && $_REQUEST['INPUTS'] [$fieldName] != '' ) {
|
||||
require_once 'classes/model/AppFolder.php';
|
||||
require_once 'classes/model/InputDocument.php';
|
||||
|
||||
$inputDocument = new InputDocument();
|
||||
$id = $inputDocument->load($_REQUEST['INPUTS'] [$fieldName]);
|
||||
|
||||
//Get the Custom Folder ID (create if necessary)
|
||||
$oFolder=new AppFolder();
|
||||
$folderId=$oFolder->createFromPath($id['INP_DOC_DESTINATION_PATH']);
|
||||
|
||||
//Tags
|
||||
$fileTags=$oFolder->parseTags($id['INP_DOC_TAGS']);
|
||||
|
||||
$fields = array (
|
||||
'APP_UID' => $_REQUEST['APP_UID'],
|
||||
'DEL_INDEX' => $_REQUEST ['DEL_INDEX'],
|
||||
'USR_UID' => $casesFields['APP_DATA']['USER_LOGGED'],
|
||||
'DOC_UID' => $_REQUEST['INPUTS'] [$fieldName],
|
||||
'APP_DOC_TYPE' => 'INPUT',
|
||||
'APP_DOC_CREATE_DATE' => date ( 'Y-m-d H:i:s' ),
|
||||
'APP_DOC_COMMENT' => '',
|
||||
'APP_DOC_TITLE' => '',
|
||||
'APP_DOC_FILENAME' => $_FILES ['form'] ['name'] [$fieldName],
|
||||
'FOLDER_UID' => $folderId,
|
||||
'APP_DOC_TAGS' => $fileTags
|
||||
);
|
||||
} else {
|
||||
$fields = array (
|
||||
'APP_UID' => $_REQUEST['APP_UID'],
|
||||
'DEL_INDEX' => $_REQUEST ['DEL_INDEX'],
|
||||
'USR_UID' => $casesFields['APP_DATA']['USER_LOGGED'],
|
||||
'DOC_UID' => - 1,
|
||||
'APP_DOC_TYPE' => 'ATTACHED',
|
||||
'APP_DOC_CREATE_DATE' => date ( 'Y-m-d H:i:s' ),
|
||||
'APP_DOC_COMMENT' => '',
|
||||
'APP_DOC_TITLE' => '',
|
||||
'APP_DOC_FILENAME' => $_FILES ['form'] ['name'] [$fieldName]
|
||||
);
|
||||
}
|
||||
|
||||
$appDocument->create($fields);
|
||||
$docVersion = $appDocument->getDocVersion();
|
||||
$appDocUid = $appDocument->getAppDocUid ();
|
||||
$info = pathinfo ( $appDocument->getAppDocFilename () );
|
||||
$extension = (isset ( $info ['extension'] ) ? $info ['extension'] : '');
|
||||
$pathName = PATH_DOCUMENT . $_REQUEST['APP_UID'] . PATH_SEP;
|
||||
$fileName = $appDocUid . '_'.$docVersion.'.' . $extension;
|
||||
|
||||
G::uploadFile ( $_FILES ['form'] ['tmp_name'] [$fieldName], $pathName, $fileName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$assign = $result['message'];
|
||||
$aMessage['MESSAGE'] = '<strong>The information was submitted. Thank you.</strong>';
|
||||
} else {
|
||||
throw new Exception('An error occurred while the application was being processed.<br /><br />
|
||||
Error code: '.$result->status_code.'<br />
|
||||
Error message: '.$result->message.'<br /><br />');
|
||||
}
|
||||
|
||||
// Update
|
||||
$dataResponses['ABE_RES_STATUS'] = ($code == 0 ? 'SENT' : 'ERROR');
|
||||
$dataResponses['ABE_RES_MESSAGE'] = ($code == 0 ? '-' : $result->message);
|
||||
|
||||
try {
|
||||
$abeAbeResponsesInstance = new AbeResponses();
|
||||
$abeAbeResponsesInstance->createOrUpdate($dataResponses);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', $aMessage);
|
||||
} catch (Exception $error) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => $error->getMessage().'Please contact to your system administrator.'));
|
||||
}
|
||||
|
||||
G::RenderPage('publish', 'blank');
|
||||
}
|
||||
|
||||
84
workflow/engine/methods/services/utils.php
Executable file
84
workflow/engine/methods/services/utils.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
function postNote($httpData)
|
||||
{
|
||||
//extract(getExtJSParams());
|
||||
$appUid = (isset($httpData->appUid))? $httpData->appUid : '';
|
||||
|
||||
$usrUid = (isset($httpData->usrUid))? $httpData->usrUid : '' ;
|
||||
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
|
||||
$appNotes = new AppNotes();
|
||||
$noteContent = addslashes($httpData->noteText);
|
||||
|
||||
$result = $appNotes->postNewNote($appUid, $usrUid, $noteContent, false);
|
||||
//return true;
|
||||
|
||||
//die();
|
||||
//send the response to client
|
||||
@ini_set('implicit_flush', 1);
|
||||
ob_start();
|
||||
//echo G::json_encode($result);
|
||||
@ob_flush();
|
||||
@flush();
|
||||
@ob_end_flush();
|
||||
ob_implicit_flush(1);
|
||||
//return true;
|
||||
//send notification in background
|
||||
$noteRecipientsList = array();
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
$p = $oCase->getUsersParticipatedInCase($appUid);
|
||||
|
||||
foreach ($p['array'] as $key => $userParticipated) {
|
||||
$noteRecipientsList[] = $key;
|
||||
}
|
||||
|
||||
$noteRecipients = implode(",", $noteRecipientsList);
|
||||
|
||||
$appNotes->sendNoteNotification($appUid, $usrUid, $noteContent, $noteRecipients);
|
||||
|
||||
}
|
||||
|
||||
function loadAbeRequest($AbeRequestsUid)
|
||||
{
|
||||
require_once 'classes/model/AbeRequests.php';
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(AbeRequestsPeer::ABE_REQ_UID, $AbeRequestsUid);
|
||||
$resultRequests = AbeRequestsPeer::doSelectRS($criteria);
|
||||
$resultRequests->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$resultRequests->next();
|
||||
$abeRequests = $resultRequests->getRow();
|
||||
|
||||
return $abeRequests;
|
||||
}
|
||||
|
||||
function loadAbeConfiguration($AbeConfigurationUid)
|
||||
{
|
||||
require_once 'classes/model/AbeConfiguration.php';
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(AbeConfigurationPeer::ABE_UID, $AbeConfigurationUid);
|
||||
$result = AbeConfigurationPeer::doSelectRS($criteria);
|
||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$result->next();
|
||||
$abeConfiguration = $result->getRow();
|
||||
|
||||
return $abeConfiguration;
|
||||
}
|
||||
|
||||
function uploadAbeRequest($data)
|
||||
{
|
||||
require_once 'classes/model/AbeRequests.php';
|
||||
|
||||
try {
|
||||
$abeRequestsInstance = new AbeRequests();
|
||||
$abeRequestsInstance->createOrUpdate($data);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ SELECT
|
||||
APPLICATION.PRO_UID,
|
||||
DATE_FORMAT(APPLICATION.APP_INIT_DATE, '%m') AS `MONTH`,
|
||||
DATE_FORMAT(APPLICATION.APP_INIT_DATE, '%Y') AS `YEAR`,
|
||||
AVG(APPLICATION.APP_DURATION) AS `AVG_TIME`,
|
||||
STD(APPLICATION.APP_DURATION) AS `STD_TIME`,
|
||||
AVG(APPLICATION.APP_DURATION*24) AS `AVG_TIME`,
|
||||
STD(APPLICATION.APP_DURATION*24) AS `STD_TIME`,
|
||||
COUNT(APPLICATION.APP_INIT_DATE) AS `TOTAL_CASES_IN`,
|
||||
COUNT(APPLICATION.APP_FINISH_DATE) AS `TOTAL_CASES_OUT`,
|
||||
NULL,
|
||||
|
||||
@@ -29,12 +29,12 @@ SELECT
|
||||
ACV.PRO_UID,
|
||||
DATE_FORMAT(ACV.DEL_INIT_DATE, '%m') AS `MONTH`,
|
||||
DATE_FORMAT(ACV.DEL_INIT_DATE, '%Y') AS `YEAR`,
|
||||
SUM(ACV.DEL_DURATION) AS TOT_TIME_BY_TASK,
|
||||
SUM(ACV.DEL_DURATION*24) AS TOT_TIME_BY_TASK,
|
||||
COUNT(ACV.DEL_INIT_DATE) AS TOT_CASES_IN,
|
||||
COUNT(ACV.DEL_FINISH_DATE) AS TOT_CASES_OUT,
|
||||
NULL,
|
||||
AVG(DEL_DURATION) AS `AVG_TIME`,
|
||||
STD(DEL_DURATION) AS `STD_TIME`,
|
||||
AVG(DEL_DURATION*24) AS `AVG_TIME`,
|
||||
STD(DEL_DURATION*24) AS `STD_TIME`,
|
||||
NULL,
|
||||
count(if(ACV.DEL_DELAY_DURATION > 0, 1, NULL)) AS TOTAL_CASES_OVERDUE,
|
||||
count(if(ACV.DEL_DELAY_DURATION <= 0, 1, NULL)) AS TOTAL_CASES_ON_TIME
|
||||
|
||||
@@ -19,9 +19,11 @@ class ActionsByEmail
|
||||
case 'configuration':
|
||||
require_once 'classes/model/AbeConfiguration.php';
|
||||
$abeConfigurationInstance = new \AbeConfiguration();
|
||||
$noteValues = json_decode($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE']);
|
||||
foreach ($noteValues as $value) {
|
||||
$feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'] = $value;
|
||||
if(isset($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'])){
|
||||
$noteValues = json_decode($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE']);
|
||||
foreach ($noteValues as $value) {
|
||||
$feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'] = $value;
|
||||
}
|
||||
}
|
||||
$abeConfigurationInstance->createOrUpdate($feature['fields']);
|
||||
break;
|
||||
@@ -50,8 +52,13 @@ class ActionsByEmail
|
||||
$result->next();
|
||||
$configuration = array();
|
||||
if ($configuration = $result->getRow()) {
|
||||
$configuration['ABE_EMAIL_FIELD_VALUE'] = $configuration['ABE_EMAIL_FIELD'];
|
||||
$configuration['ABE_ACTION_FIELD_VALUE'] = $configuration['ABE_ACTION_FIELD'];
|
||||
$configuration['ABE_UID'] = $configuration['ABE_UID'];
|
||||
$configuration['ABE_TYPE'] = $configuration['ABE_TYPE'];
|
||||
$configuration['DYN_UID'] = $configuration['DYN_UID'];
|
||||
$configuration['ABE_TEMPLATE'] = $configuration['ABE_TEMPLATE'];
|
||||
$configuration['ABE_SUBJECT_FIELD'] = $configuration['ABE_SUBJECT_FIELD'];
|
||||
$configuration['ABE_EMAIL_FIELD'] = $configuration['ABE_EMAIL_FIELD'];
|
||||
$configuration['ABE_ACTION_FIELD'] = $configuration['ABE_ACTION_FIELD'];
|
||||
$configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]';
|
||||
}
|
||||
$configuration['feature'] = 'ActionsByEmail';
|
||||
|
||||
@@ -3,7 +3,6 @@ namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use \G;
|
||||
|
||||
|
||||
class ReportingIndicators
|
||||
{
|
||||
// /**et
|
||||
|
||||
@@ -3,6 +3,12 @@ namespace ProcessMaker\Services\Api;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
use \G;
|
||||
use \Smarty;
|
||||
use \Criteria;
|
||||
use \ResultSet;
|
||||
use \DynaformPeer;
|
||||
use \ContentPeer;
|
||||
|
||||
require_once 'classes/model/AbeConfiguration.php';
|
||||
require_once 'classes/model/AbeRequests.php';
|
||||
@@ -544,5 +550,28 @@ class ActionsByEmail extends Api
|
||||
}
|
||||
return $templates;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @url GET /Dynaforms/:proUid
|
||||
*/
|
||||
public function getDynaforms($proUid)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_UID);
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->addJoin( DynaformPeer::DYN_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN );
|
||||
$criteria->add( DynaformPeer::PRO_UID, $proUid, Criteria::EQUAL );
|
||||
$criteria->add( DynaformPeer::DYN_TYPE, 'xmlform', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'DYN_TITLE');
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG);
|
||||
$dataset = DynaformPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dynaform = array();
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$dynaform[] = array('DYN_UID' => $aRow['DYN_UID'], 'DYN_NAME' => $aRow['CON_VALUE']);
|
||||
}
|
||||
return $dynaform;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,12 +118,11 @@ class Activity extends Api
|
||||
}
|
||||
$task = new \ProcessMaker\BusinessModel\Task();
|
||||
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (\PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
if (isset($request_data['properties']['_features']) && !empty($request_data['properties']['_features']['ActionsByEmail']['fields']['ABE_UID'])) {
|
||||
if (isset($request_data['properties']['_features'])) {
|
||||
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
|
||||
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ class ReportingIndicators extends Api
|
||||
*
|
||||
* @url GET /group-employee-data
|
||||
*/
|
||||
|
||||
public function doGetGroupEmployeesData($group_uid, $init_date, $end_date, $language)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -746,10 +746,10 @@ Ext.onReady( function() {
|
||||
anchor:'90%'
|
||||
},
|
||||
{
|
||||
id : 'dynaformCalendarName' ,
|
||||
xtype : 'textfield' ,
|
||||
id : 'dynaformCalendarName' ,
|
||||
width : 200 ,
|
||||
fieldLabel : _('ID_NAME') ,
|
||||
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_NAME')) +'"> * </span>' + _('ID_NAME') ,
|
||||
xtype : 'textfield' ,
|
||||
name : 'name' ,
|
||||
msgTarget: 'side',
|
||||
enableKeyEvents: true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var storeCountry;
|
||||
var storeRegion;
|
||||
var storeLocation;
|
||||
var storeLocation;
|
||||
var storeReplacedBy;
|
||||
var storeCalendar;
|
||||
var storeRole;
|
||||
@@ -389,9 +389,9 @@ Ext.onReady(function () {
|
||||
hiddenName : 'USR_ROLE',
|
||||
id : 'USR_ROLE',
|
||||
readOnly : readMode,
|
||||
store : storeRole,
|
||||
store : storeRole,
|
||||
valueField : 'ROL_UID',
|
||||
displayField : 'ROL_CODE',
|
||||
displayField : 'ROL_CODE',
|
||||
emptyText : TRANSLATIONS.ID_SELECT,
|
||||
width : 260,
|
||||
selectOnFocus : true,
|
||||
@@ -414,7 +414,7 @@ Ext.onReady(function () {
|
||||
'change': function(field, newVal, oldVal){
|
||||
var fname = newVal.replace(/^\s+/,'').replace(/\s+$/,'');
|
||||
field.setValue(fname.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -427,7 +427,7 @@ Ext.onReady(function () {
|
||||
'change': function(field, newVal, oldVal){
|
||||
var lname = newVal.replace(/^\s+/,'').replace(/\s+$/,'');
|
||||
field.setValue(lname.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -657,7 +657,7 @@ Ext.onReady(function () {
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
var accountOptions = new Ext.form.FieldSet({
|
||||
title: _('ID_ACCOUNT_OPTIONS'),
|
||||
items: [{
|
||||
@@ -670,7 +670,7 @@ Ext.onReady(function () {
|
||||
uncheckedValue: 0
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
storeDefaultMainMenuOption = new Ext.data.Store({
|
||||
proxy: new Ext.data.HttpProxy({
|
||||
url: "usersAjax",
|
||||
@@ -925,7 +925,7 @@ Ext.onReady(function () {
|
||||
fieldLabel : _('ID_ROLE'),
|
||||
xtype : 'label',
|
||||
width : 260
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
/*----------------------------------********---------------------------------*/
|
||||
@@ -1312,7 +1312,7 @@ function loadData()
|
||||
|
||||
comboRole.store.on("load", function (store) {
|
||||
comboRole.setValue(store.getAt(1).get("ROL_UID"));
|
||||
});
|
||||
});
|
||||
comboRole.store.load();
|
||||
|
||||
comboDefaultMainMenuOption.store.on("load", function (store) {
|
||||
|
||||
Reference in New Issue
Block a user