Merged in bugfix/HOR-3670-DC (pull request #5927)
HOR-3670 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
73031feb70
@@ -7,6 +7,7 @@ use ProcessMaker\Services;
|
||||
use ProcessMaker\Services\Api;
|
||||
use Luracast\Restler\RestException;
|
||||
use Illuminate\Foundation\Http\Kernel;
|
||||
use G;
|
||||
|
||||
/**
|
||||
* Web application bootstrap
|
||||
@@ -448,6 +449,7 @@ class WebApplication
|
||||
define("PATH_CONTROLLERS", PATH_CORE . "controllers" . PATH_SEP);
|
||||
define("PATH_SERVICES_REST", PATH_CORE . "services" . PATH_SEP . "rest" . PATH_SEP);
|
||||
|
||||
G::defineConstants();
|
||||
$arraySystemConfiguration = \PmSystem::getSystemConfiguration();
|
||||
|
||||
ini_set('date.timezone', $arraySystemConfiguration['time_zone']); //Set Time Zone
|
||||
|
||||
@@ -5823,6 +5823,19 @@ class G
|
||||
$_SESSION['_DATA_TRIGGER_']['_TRI_LOG_'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the Processmaker constants.
|
||||
*
|
||||
*/
|
||||
public static function defineConstants()
|
||||
{
|
||||
//Moved from Enterprise class.
|
||||
if (file_exists(PATH_METHODS . "login/version-pmos.php")) {
|
||||
include (PATH_METHODS . "login/version-pmos.php");
|
||||
}
|
||||
//Removed default version from code.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -369,7 +369,7 @@ class Publisher
|
||||
default:
|
||||
$label = ($oTable->fields[$f]['Label'] != '') ? $oTable->fields[$f]['Label'] : $f;
|
||||
$label = str_replace( "\n", ' ', $label );
|
||||
$pm->fields[$f] = new XmlForm_Field_popupOption( new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $oTable->id . '.showHideField("' . $f . '")' ) ) );
|
||||
$pm->fields[$f] = new XmlForm_Field_PopupOption( new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $oTable->id . '.showHideField("' . $f . '")' ) ) );
|
||||
$pm->values[$f] = '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ class RBAC
|
||||
{
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$licenseManager =& pmLicenseManager::getSingleton();
|
||||
$licenseManager =& PmLicenseManager::getSingleton();
|
||||
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
|
||||
return -7;
|
||||
}
|
||||
|
||||
@@ -5467,6 +5467,86 @@ class XmlForm
|
||||
public $requiredFields = array ();
|
||||
public $fieldContentWidth = 450;
|
||||
|
||||
/**
|
||||
* List of xmlform controls and its classes.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private static $controls = [
|
||||
'button' => XmlForm_Field_Button::class,
|
||||
'caption' => XmlForm_Field_Caption::class,
|
||||
'captioncurrency' => XmlForm_Field_CaptionCurrency::class,
|
||||
'captionpercentage' => XmlForm_Field_CaptionPercentage::class,
|
||||
'cellmark' => XmlForm_Field_cellMark::class,
|
||||
'checkbox2' => XmlForm_Field_Checkbox2::class,
|
||||
'checkbox' => XmlForm_Field_Checkbox::class,
|
||||
'checkboxpt' => XmlForm_Field_Checkboxpt::class,
|
||||
'checkboxtable' => XmlForm_Field_CheckBoxTable::class,
|
||||
'checkgroup' => XmlForm_Field_CheckGroup::class,
|
||||
'checkgroupview' => XmlForm_Field_CheckGroupView::class,
|
||||
'currency' => XmlForm_Field_Currency::class,
|
||||
'date2' => XmlForm_Field_Date2::class,
|
||||
'date5' => XmlForm_Field_Date5::class,
|
||||
'date' => XmlForm_Field_Date::class,
|
||||
'dateview' => XmlForm_Field_DateView::class,
|
||||
'dropdown' => XmlForm_Field_Dropdown::class,
|
||||
'dropdownpt' => XmlForm_Field_Dropdownpt::class,
|
||||
'dveditor' => XmlForm_Field_DVEditor::class,
|
||||
'fastsearch' => XmlForm_Field_FastSearch::class,
|
||||
'file' => XmlForm_Field_File::class,
|
||||
'grid' => XmlForm_Field_Grid::class,
|
||||
'hidden' => XmlForm_Field_Hidden::class,
|
||||
'hours' => XmlForm_Field_Hours::class,
|
||||
'html' => XmlForm_Field_HTML::class,
|
||||
'image' => XmlForm_Field_Image::class,
|
||||
'javascript' => XmlForm_Field_JavaScript::class,
|
||||
'label' => XmlForm_Field_Label::class,
|
||||
'link' => XmlForm_Field_Link::class,
|
||||
'listbox' => XmlForm_Field_Listbox::class,
|
||||
'password' => XmlForm_Field_Password::class,
|
||||
'percentage' => XmlForm_Field_Percentage::class,
|
||||
'popupoption' => XmlForm_Field_PopupOption::class,
|
||||
'print' => XmlForm_Field_Print::class,
|
||||
'radiogroup' => XmlForm_Field_RadioGroup::class,
|
||||
'radiogroupview' => XmlForm_Field_RadioGroupView::class,
|
||||
'reset' => XmlForm_Field_Reset::class,
|
||||
'simpletext' => XmlForm_Field_SimpleText::class,
|
||||
'submit' => XmlForm_Field_Submit::class,
|
||||
'subtitle' => XmlForm_Field_Subtitle::class,
|
||||
'suggest' => XmlForm_Field_Suggest::class,
|
||||
'text' => XmlForm_Field_Text::class,
|
||||
'textarea' => XmlForm_Field_Textarea::class,
|
||||
'textareapm' => XmlForm_Field_TextareaPM::class,
|
||||
'textpm' => XmlForm_Field_TextPM::class,
|
||||
'title' => XmlForm_Field_Title::class,
|
||||
'toolbar' => XmlForm_Field_ToolBar::class,
|
||||
'toolbutton' => XmlForm_Field_toolButton::class,
|
||||
'wysiwyg_editor' => XmlForm_Field_WYSIWYG_EDITOR::class,
|
||||
'xmlform' => XmlForm_Field_Xmlform::class,
|
||||
'xmlmenu' => XmlForm_Field_XmlMenu::class,
|
||||
'yesno' => XmlForm_Field_YesNo::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Get xmlform control class by type.
|
||||
*
|
||||
* @param string $type
|
||||
* @return string
|
||||
*/
|
||||
private function getClassByControlType($type)
|
||||
{
|
||||
$key = strtolower($type);
|
||||
if (isset(self::$controls[$key])) {
|
||||
return self::$controls[$key];
|
||||
} elseif (class_exists('XmlForm_Field_' . $type)) {
|
||||
return 'XmlForm_Field_' . $type;
|
||||
} elseif (class_exists('XmlForm_Field_' . $key)) {
|
||||
return 'XmlForm_Field_' . $key;
|
||||
} else {
|
||||
return 'XmlForm_Field';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function xmlformTemplate
|
||||
*
|
||||
@@ -5567,14 +5647,8 @@ class XmlForm
|
||||
|
||||
foreach ($xmlNode as $k => $v) {
|
||||
if (($xmlNode[$k]->type !== 'cdata') && isset( $xmlNode[$k]->attributes['type'] )) {
|
||||
if (class_exists( 'XmlForm_Field_' . $xmlNode[$k]->attributes['type'] )) {
|
||||
$x = '$field = new XmlForm_Field_' . $xmlNode[$k]->attributes['type'] . '( $xmlNode[$k], $language, $this->home, $this);';
|
||||
|
||||
eval( $x );
|
||||
} else {
|
||||
$field = new XmlForm_Field( $xmlNode[$k], $language, $this->home, $this );
|
||||
}
|
||||
|
||||
$class = $this->getClassByControlType($xmlNode[$k]->attributes['type']);
|
||||
$field = new $class( $xmlNode[$k], $language, $this->home, $this );
|
||||
$field->language = $this->language;
|
||||
$this->fields[$field->name] = $field;
|
||||
}
|
||||
|
||||
@@ -81,4 +81,4 @@
|
||||
if (!is_dir(PATH_SMARTY_C)) G::mk_dir(PATH_SMARTY_C);
|
||||
if (!is_dir(PATH_SMARTY_CACHE)) G::mk_dir(PATH_SMARTY_CACHE);
|
||||
|
||||
?>
|
||||
G::defineConstants();
|
||||
|
||||
@@ -170,7 +170,7 @@ class WorkflowTestCase extends TestCase
|
||||
throw new \Exception('To continue please put a valid license at features/resources');
|
||||
}
|
||||
G::LoadClass('pmLicenseManager');
|
||||
$licenseManager = new pmLicenseManager();
|
||||
$licenseManager = new PmLicenseManager();
|
||||
$licenseManager->installLicense($licenseFile[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ class ActionsByEmailCoreClass extends PMPlugin
|
||||
$field->label = '';
|
||||
$actionField = str_replace(array('@@', '@#', '@=', '@%', '@?', '@$'), '', $configuration['ABE_ACTION_FIELD']);
|
||||
|
||||
$obj = new pmDynaform($configuration['DYN_UID']);
|
||||
$obj = new PmDynaform($configuration['DYN_UID']);
|
||||
$configuration['CURRENT_DYNAFORM'] = $configuration['DYN_UID'];
|
||||
$file = $obj->printPmDynaformAbe($configuration);
|
||||
$__ABE__ .= $file;
|
||||
@@ -222,7 +222,7 @@ class ActionsByEmailCoreClass extends PMPlugin
|
||||
}
|
||||
}
|
||||
|
||||
$obj = new pmDynaform($configuration['DYN_UID']);
|
||||
$obj = new PmDynaform($configuration['DYN_UID']);
|
||||
$configuration['CURRENT_DYNAFORM'] = $configuration['DYN_UID'];
|
||||
$file = $obj->printPmDynaformAbe($configuration);
|
||||
$__ABE__ .= $file;
|
||||
|
||||
@@ -52,7 +52,7 @@ class ConsolidatedCases
|
||||
$oReportTables = new ReportTables();
|
||||
$oReportTables->deleteAllReportVars($_POST['form']['REP_TAB_UID']);
|
||||
|
||||
$pmDyna = new pmDynaform(array());
|
||||
$pmDyna = new PmDynaform(array());
|
||||
$pmDyna->fields["CURRENT_DYNAFORM"] = $DynUid;
|
||||
$dataDyna = $pmDyna->getDynaform();
|
||||
$json = G::json_decode($dataDyna["DYN_CONTENT"]);
|
||||
|
||||
@@ -274,7 +274,7 @@ class DashletOpenVsCompleted implements DashletInterface
|
||||
|
||||
public function render ($width = 300)
|
||||
{
|
||||
$g = new pmGauge();
|
||||
$g = new PmGauge();
|
||||
$g->w = $width;
|
||||
$g->value = $this->value;
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
|
||||
class DynaformEditor extends WebResource
|
||||
/**
|
||||
* Created on 21/12/2007
|
||||
* Dynaform - Dynaform
|
||||
/**
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/class DynaformEditor extends WebResource
|
||||
{
|
||||
|
||||
private $isOldCopy = false;
|
||||
@@ -36,7 +42,7 @@ class DynaformEditor extends WebResource
|
||||
* @param string $get
|
||||
* @return void
|
||||
*/
|
||||
public function dynaformEditor($get)
|
||||
public function __construct($get)
|
||||
{
|
||||
$this->panelConf = array_merge($this->panelConf, $this->defaultConfig['Editor']);
|
||||
//'title' => G::LoadTranslation('ID_DYNAFORM_EDITOR').' - ['.$this->title.']',
|
||||
@@ -111,7 +117,7 @@ class DynaformEditor extends WebResource
|
||||
$openDoc->parseXmlFile($fileName);
|
||||
}
|
||||
//$form = new Form( $this->file , $this->home, SYS_LANG, true );
|
||||
$Properties = dynaformEditorAjax::get_properties($A, $this->dyn_uid);
|
||||
$Properties = DynaformEditorAjax::get_properties($A, $this->dyn_uid);
|
||||
/* Start Block: Prepare the XMLDB connection */
|
||||
define('DB_XMLDB_HOST', PATH_DYNAFORM . $this->file . '.xml');
|
||||
define('DB_XMLDB_USER', '');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (!defined("PM_VERSION")) {
|
||||
if (file_exists(PATH_METHODS . "login/version-pmos.php")) {
|
||||
include (PATH_METHODS . "login/version-pmos.php");
|
||||
} else {
|
||||
define("PM_VERSION", "2.0.0");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class enterpriseClass extends PMPlugin
|
||||
class EnterpriseClass extends PMPlugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
interface iDynaformEditorAjax
|
||||
interface IDynaformEditorAjax
|
||||
{
|
||||
//public function render_preview($A);
|
||||
|
||||
}
|
||||
@@ -334,7 +334,7 @@ class PMLicensedFeatures
|
||||
/*----------------------------------********---------------------------------*/
|
||||
public function verifyfeature ($featureName)
|
||||
{
|
||||
$licenseManager = pmLicenseManager::getSingleton(false);
|
||||
$licenseManager = PmLicenseManager::getSingleton(false);
|
||||
|
||||
$_SESSION['__sw__'] = true;
|
||||
$padl = new Padl();
|
||||
|
||||
@@ -128,7 +128,7 @@ class PMPluginRegistry
|
||||
return;
|
||||
}
|
||||
|
||||
$detail = new pluginDetail( $sNamespace, $sClassName, $sFilename, $plugin->sFriendlyName, $plugin->sPluginFolder, $plugin->sDescription, $plugin->sSetupPage, $plugin->iVersion );
|
||||
$detail = new PluginDetail( $sNamespace, $sClassName, $sFilename, $plugin->sFriendlyName, $plugin->sPluginFolder, $plugin->sDescription, $plugin->sSetupPage, $plugin->iVersion );
|
||||
|
||||
if (isset( $plugin->aWorkspaces )) {
|
||||
$detail->aWorkspaces = $plugin->aWorkspaces;
|
||||
@@ -1207,7 +1207,7 @@ class PMPluginRegistry
|
||||
//Found a License
|
||||
if (class_exists( 'pmLicenseManager' )) {
|
||||
$sSerializedFile = PATH_DATA_SITE . 'lmn.singleton';
|
||||
$pmLicenseManagerO = & pmLicenseManager::getSingleton();
|
||||
$pmLicenseManagerO = & PmLicenseManager::getSingleton();
|
||||
if (file_exists( $sSerializedFile )) {
|
||||
$pmLicenseManagerO->unSerializeInstance( file_get_contents( $sSerializedFile ) );
|
||||
}
|
||||
|
||||
@@ -1,45 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.pluginRegistry.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/
|
||||
|
||||
//@todo: Pending until class.plugin.php is solved.
|
||||
require_once 'class.plugin.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/class pluginDetail
|
||||
*/class PluginDetail
|
||||
{
|
||||
public $sNamespace;
|
||||
public $sClassName;
|
||||
@@ -67,7 +39,7 @@ require_once 'class.plugin.php';
|
||||
* @param integer $iVersion
|
||||
* @return void
|
||||
*/
|
||||
public function __construct ($sNamespace, $sClassName, $sFilename, $sFriendlyName = '', $sPluginFolder = '', $sDescription = '', $sSetupPage = '', $iVersion = 0)
|
||||
public function __construct($sNamespace, $sClassName, $sFilename, $sFriendlyName = '', $sPluginFolder = '', $sDescription = '', $sSetupPage = '', $iVersion = 0)
|
||||
{
|
||||
$this->sNamespace = $sNamespace;
|
||||
$this->sClassName = $sClassName;
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.pmDynaform.php
|
||||
* Implementing pmDynaform library in the running case.
|
||||
*
|
||||
* @author Roly Rudy Gutierrez Pinto
|
||||
* @package engine.classes
|
||||
*/
|
||||
|
||||
/**
|
||||
* class.pmDynaform.php
|
||||
* Implementing pmDynaform library in the running case.
|
||||
*
|
||||
* @author Roly Rudy Gutierrez Pinto
|
||||
* @package engine.classes
|
||||
*/class pmDynaform
|
||||
*/class PmDynaform
|
||||
{
|
||||
|
||||
public static $instance = null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
class pmGauge
|
||||
class PmGauge
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
/**
|
||||
* class.pmLicenseManager.php
|
||||
*
|
||||
*/class pmLicenseManager
|
||||
*/class PmLicenseManager
|
||||
{
|
||||
|
||||
private static $instance = null;
|
||||
@@ -120,7 +120,7 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
public static function getSingleton($flagActivatePlugins = true)
|
||||
{
|
||||
if (self::$instance == null) {
|
||||
self::$instance = new pmLicenseManager($flagActivatePlugins);
|
||||
self::$instance = new PmLicenseManager($flagActivatePlugins);
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
@@ -1,48 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* class.ArrayPeer.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Phing Class Wrapper
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
*/
|
||||
|
||||
include_once 'phing/Phing.php';
|
||||
set_include_path( PATH_THIRDPARTY . 'propel-generator/classes/' . PATH_SEPARATOR . get_include_path() );
|
||||
|
||||
if (! class_exists( 'Phing' )) {
|
||||
throw new Exception( 'Fatal Error: Phing is not loaded!' );
|
||||
}
|
||||
|
||||
|
||||
class pmPhing extends Phing
|
||||
class PmPhing extends Phing
|
||||
{
|
||||
|
||||
public function getPhingVersion ()
|
||||
public function getPhingVersion()
|
||||
{
|
||||
return 'pmPhing Ver 1.0';
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@ class PmTable
|
||||
Phing::startup();
|
||||
Phing::setProperty('phing.home', getenv('PHING_HOME'));
|
||||
|
||||
$m = new pmPhing();
|
||||
$m = new PmPhing();
|
||||
$m->execute($args);
|
||||
$m->runBuild();
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class PopupMenu extends form
|
||||
$label = str_replace( "\n", ' ', $label );
|
||||
$pmXmlNode = new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $tableId . '.showHideField("' . $f . '")'
|
||||
) );
|
||||
$this->fields[$f] = new XmlForm_Field_popupOption( $pmXmlNode );
|
||||
$this->fields[$f] = new XmlForm_Field_PopupOption( $pmXmlNode );
|
||||
$this->values[$f] = '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1985,7 +1985,7 @@ class WorkspaceTools
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('95OY24wcXpEMzIyRmlNSnF0STNFSHJzMG9wYTJKekpLNmY2ZmRCeGtuZk5oUDloaUNhUGVjTDJBPT0=')) {
|
||||
enterpriseClass::setHashPassword($response);
|
||||
EnterpriseClass::setHashPassword($response);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,50 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.xmlDb.php
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* XMLDB
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
*
|
||||
* @copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* XMLDB
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
*
|
||||
* @copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
*/class XMLDB
|
||||
class XMLDB
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,50 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.xmlDb.php
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* XMLDB
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
*
|
||||
* @copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* XMLResult
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
*
|
||||
* @copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
*/class XMLResult
|
||||
*/
|
||||
class XMLResult
|
||||
{
|
||||
var $result = array ();
|
||||
var $cursor = 0;
|
||||
|
||||
@@ -1,36 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.xmlfield_InputPM.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
**/
|
||||
|
||||
|
||||
/**
|
||||
* Class XmlForm_Field_CheckBoxTable
|
||||
*/class XmlForm_Field_CheckBoxTable extends XmlForm_Field_Checkbox
|
||||
*
|
||||
*/
|
||||
class XmlForm_Field_CheckBoxTable extends XmlForm_Field_Checkbox
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -42,11 +16,10 @@
|
||||
* @param eter string owner
|
||||
* @return string
|
||||
*/
|
||||
public function render ($value = null, $owner = null)
|
||||
public function render($value = null, $owner = null)
|
||||
{
|
||||
//$optionName = $owner->values['USR_UID'];
|
||||
$optionName = $value;
|
||||
$onclick = (($this->onclick) ? ' onclick="' . G::replaceDataField( $this->onclick, $owner->values ) . '" ' : '');
|
||||
$onclick = (($this->onclick) ? ' onclick="' . G::replaceDataField($this->onclick, $owner->values) . '" ' : '');
|
||||
$html = '<input class="FormCheck" id="form[' . $this->name . '][' . $optionName . ']" name="form[' . $this->name . '][' . $optionName . ']" type=\'checkbox\' value="' . $value . '"' . $onclick . '> <span class="FormCheck"></span></input>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -1,36 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.xmlfield_InputPM.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
**/
|
||||
|
||||
|
||||
/**
|
||||
* Class XmlForm_Field_hours
|
||||
*/class XmlForm_Field_hours extends XmlForm_Field_SimpleText
|
||||
*
|
||||
*/
|
||||
class XmlForm_Field_Hours extends XmlForm_Field_SimpleText
|
||||
{
|
||||
public $size = 15;
|
||||
public $maxLength = 64;
|
||||
@@ -45,7 +19,7 @@
|
||||
public $readOnly = false;
|
||||
public $sqlConnection = 0;
|
||||
public $sql = '';
|
||||
public $sqlOption = array ();
|
||||
public $sqlOption = array();
|
||||
//Atributes only for grids
|
||||
public $formula = '';
|
||||
public $function = '';
|
||||
@@ -63,21 +37,21 @@
|
||||
* @param eter string owner
|
||||
* @return string
|
||||
*/
|
||||
public function render ($value = null, $owner = null)
|
||||
public function render($value = null, $owner = null)
|
||||
{
|
||||
if ($this->strTo === 'UPPER') {
|
||||
$value = strtoupper( $value );
|
||||
$value = strtoupper($value);
|
||||
}
|
||||
if ($this->strTo === 'LOWER') {
|
||||
$value = strtolower( $value );
|
||||
$value = strtolower($value);
|
||||
}
|
||||
//if ($this->strTo==='CAPITALIZE') $value = strtocapitalize($value);
|
||||
$onkeypress = G::replaceDataField( $this->onkeypress, $owner->values );
|
||||
$onkeypress = G::replaceDataField($this->onkeypress, $owner->values);
|
||||
if ($this->replaceTags == 1) {
|
||||
$value = G::replaceDataField( $value, $owner->values );
|
||||
$value = G::replaceDataField($value, $owner->values);
|
||||
}
|
||||
if ($this->showVars == 1) {
|
||||
$this->process = G::replaceDataField( $this->process, $owner->values );
|
||||
$this->process = G::replaceDataField($this->process, $owner->values);
|
||||
//$sShowVars = ' <a href="#" onclick="showDynaformsFormVars(\'form['.$this->name.']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;">' . $this->symbol . '</a>';
|
||||
$sShowVars = ' <input type="button" value="' . $this->symbol . '" onclick="showDynaformsFormVars(\'form[' . $this->name . ']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;"/>';
|
||||
} else {
|
||||
@@ -85,14 +59,14 @@
|
||||
}
|
||||
if ($this->mode === 'edit') {
|
||||
if ($this->readOnly) {
|
||||
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ) . '\' readOnly="readOnly" style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" onkeypress="' . htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
|
||||
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities($value, ENT_COMPAT, 'utf-8') . '\' readOnly="readOnly" style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" onkeypress="' . htmlentities($onkeypress, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
|
||||
} else {
|
||||
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ) . '\' style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" onkeypress="' . htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
|
||||
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities($value, ENT_COMPAT, 'utf-8') . '\' style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" onkeypress="' . htmlentities($onkeypress, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
|
||||
}
|
||||
} elseif ($this->mode === 'view') {
|
||||
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ) . '\' style="display:none;' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" onkeypress="' . htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '"/>' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
|
||||
return '<input class="module_app_input___gray" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value=\'' . $this->htmlentities($value, ENT_COMPAT, 'utf-8') . '\' style="display:none;' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '" onkeypress="' . htmlentities($onkeypress, ENT_COMPAT, 'utf-8') . '"/>' . $this->htmlentities($value, ENT_COMPAT, 'utf-8');
|
||||
} else {
|
||||
return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
|
||||
return $this->htmlentities($value, ENT_COMPAT, 'utf-8');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,16 +79,16 @@
|
||||
* @param eter string owner
|
||||
* @return string
|
||||
*/
|
||||
public function renderGrid ($values = array(),$owner)
|
||||
public function renderGrid($values = array(), $owner)
|
||||
{
|
||||
$result = array ();
|
||||
$result = array();
|
||||
$r = 1;
|
||||
foreach ($values as $v) {
|
||||
if ($this->replaceTags == 1) {
|
||||
$v = G::replaceDataField( $v, $owner->values );
|
||||
$v = G::replaceDataField($v, $owner->values);
|
||||
}
|
||||
if ($this->showVars == 1) {
|
||||
$this->process = G::replaceDataField( $this->process, $owner->values );
|
||||
$this->process = G::replaceDataField($this->process, $owner->values);
|
||||
//$sShowVars = ' <a href="#" onclick="showDynaformsFormVars(\'form['.$owner->name .']['.$r.']['.$this->name.']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;">' . $this->symbol . '</a>';
|
||||
$sShowVars = ' <input type="button" value="' . $this->symbol . '" onclick="showDynaformsFormVars(\'form[' . $owner->name . '][' . $r . '][' . $this->name . ']\', \'../controls/varsAjax\', \'' . $this->process . '\', \'' . $this->symbol . '\');return false;"/>';
|
||||
} else {
|
||||
@@ -122,14 +96,14 @@
|
||||
}
|
||||
if ($this->mode === 'edit') {
|
||||
if ($this->readOnly) {
|
||||
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ) . '" readOnly="readOnly" style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
|
||||
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities($v, ENT_COMPAT, 'utf-8') . '" readOnly="readOnly" style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
|
||||
} else {
|
||||
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ) . '" style="' . htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '"/>' . $sShowVars;
|
||||
$result[] = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities($v, ENT_COMPAT, 'utf-8') . '" style="' . htmlentities($this->style, ENT_COMPAT, 'utf-8') . '"/>' . $sShowVars;
|
||||
}
|
||||
} elseif ($this->mode === 'view') {
|
||||
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities( number_format( $v, 2 ), ENT_COMPAT, 'utf-8' ) . '</p>';
|
||||
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities(number_format($v, 2), ENT_COMPAT, 'utf-8') . '</p>';
|
||||
} else {
|
||||
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities( number_format( $v, 2 ), ENT_COMPAT, 'utf-8' ) . '</p>';
|
||||
$result[] = '<p align="' . $this->align . '">' . $this->htmlentities(number_format($v, 2), ENT_COMPAT, 'utf-8') . '</p>';
|
||||
}
|
||||
$r ++;
|
||||
}
|
||||
@@ -143,7 +117,7 @@
|
||||
* @param eter string $element
|
||||
* @return string
|
||||
*/
|
||||
public function attachEvents ($element)
|
||||
public function attachEvents($element)
|
||||
{
|
||||
return "myForm.aElements[i] = new G_Text(myForm, $element,'{$this->name}');
|
||||
myForm.aElements[i].setAttributes(" . $this->getAttributes() . ");";
|
||||
|
||||
@@ -1,50 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.PopupMenu.php
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* PopupMenu - PopupMenu
|
||||
/**
|
||||
* XmlForm_Field_popupOption - XmlForm_Field_popupOption class
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
* @copyright COLOSA
|
||||
*/class XmlForm_Field_popupOption extends XmlForm_Field
|
||||
*/
|
||||
class XmlForm_Field_PopupOption extends XmlForm_Field
|
||||
{
|
||||
var $launch = '';
|
||||
public $launch = '';
|
||||
|
||||
/**
|
||||
* Get Events
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getEvents ()
|
||||
public function getEvents()
|
||||
{
|
||||
$script = '{name:"' . $this->name . '",text:"' . addcslashes( $this->label, '\\"' ) . '", launch:leimnud.closure({Function:function(target){' . $this->launch . '}, args:target})}';
|
||||
$script = '{name:"' . $this->name . '",text:"' . addcslashes($this->label, '\\"') . '", launch:leimnud.closure({Function:function(target){' . $this->launch . '}, args:target})}';
|
||||
return $script;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2387,7 +2387,7 @@ function PMFgetLabelOption ($PROCESS, $DYNAFORM_UID, $FIELD_NAME, $FIELD_SELECTE
|
||||
{
|
||||
$data = array();
|
||||
$data["CURRENT_DYNAFORM"] = $DYNAFORM_UID;
|
||||
$dynaform = new pmDynaform($data);
|
||||
$dynaform = new PmDynaform($data);
|
||||
if ($dynaform->isResponsive()) {
|
||||
$json = $dynaform->searchFieldByName($DYNAFORM_UID, $FIELD_NAME);
|
||||
$options = $json->options + $json->optionsSql;
|
||||
@@ -3127,7 +3127,7 @@ function PMFDynaFormFields($dynUid, $appUid = false, $delIndex = 0)
|
||||
}
|
||||
$data["CURRENT_DYNAFORM"] = $dynUid;
|
||||
|
||||
$dynaform = new pmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($data));
|
||||
$dynaform = new PmDynaform(\ProcessMaker\Util\DateTime::convertUtcToTimeZone($data));
|
||||
$dynaform->onPropertyRead = function(&$json, $key, $value) {
|
||||
if (isset($json->data) && !isset($json->value)) {
|
||||
$json->value = $json->data->value;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user