WYSIWYG_EDITOR get Variables Grid
WYSIWYG_EDITOR get Variables Grid
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
* @package workflow.engine.classes
|
* @package workflow.engine.classes
|
||||||
*/
|
**/
|
||||||
|
|
||||||
class XmlForm_Field_TextPM extends XmlForm_Field_SimpleText
|
class XmlForm_Field_TextPM extends XmlForm_Field_SimpleText
|
||||||
{
|
{
|
||||||
@@ -456,22 +456,51 @@ function getGridsVars ($sProcessUID)
|
|||||||
}
|
}
|
||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
function getVarsGrid ()
|
function getVarsGrid ()
|
||||||
{
|
{
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
$aFieldsNames = array ();
|
$aFieldsNames = array ();
|
||||||
require_once 'classes/model/Dynaform.php';
|
require_once 'classes/model/Dynaform.php';
|
||||||
|
|
||||||
|
|
||||||
$aFields = new Dynaform();
|
$aFields = new Dynaform();
|
||||||
//$aFields->getDynaformFields( $caseId );
|
//$aFields->getDynaformFields( $caseId );
|
||||||
|
|
||||||
$aFields->getDynaformFields( '45855056550a69a8cbeed24036053462' );
|
$aFields->getDynaformFields( '45855056550a69a8cbeed24036053462' );
|
||||||
|
|
||||||
G::pr($aFields);
|
G::pr($aFields);
|
||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getVarsGrid ($proUid, $dynUid)
|
||||||
|
{
|
||||||
|
G::LoadClass( 'dynaformhandler' );
|
||||||
|
G::LoadClass( 'AppSolr' );
|
||||||
|
|
||||||
|
$dynaformFields = array ();
|
||||||
|
|
||||||
|
if (is_file( PATH_DATA . '/sites/'. SYS_SYS .'/xmlForms/'. $proUid .'/'.$dynUid. '.xml' ) && filesize( PATH_DATA . '/sites/'. SYS_SYS .'/xmlForms/'. $proUid .'/'. $dynUid .'.xml' ) > 0) {
|
||||||
|
$dyn = new dynaFormHandler( PATH_DATA . '/sites/'. SYS_SYS .'/xmlForms/' .$proUid. '/' . $dynUid .'.xml' );
|
||||||
|
$dynaformFields[] = $dyn->getFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
$dynaformFieldTypes = array ();
|
||||||
|
|
||||||
|
foreach ($dynaformFields as $aDynFormFields) {
|
||||||
|
foreach ($aDynFormFields as $field) {
|
||||||
|
|
||||||
|
if ($field->getAttribute( 'validate' ) == 'Int') {
|
||||||
|
$dynaformFieldTypes[$field->nodeName] = 'Int';
|
||||||
|
} elseif ($field->getAttribute( 'validate' ) == 'Real') {
|
||||||
|
$dynaformFieldTypes[$field->nodeName] = 'Real';
|
||||||
|
} else {
|
||||||
|
$dynaformFieldTypes[$field->nodeName] = $field->getAttribute( 'type' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $dynaformFieldTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class XmlForm_Field_CheckBoxTable
|
* Class XmlForm_Field_CheckBoxTable
|
||||||
|
|||||||
@@ -568,15 +568,18 @@ try {
|
|||||||
|
|
||||||
case 'getVariableGrid':
|
case 'getVariableGrid':
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass('xmlfield_InputPM');
|
||||||
//$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
|
|
||||||
//$dynUid= isset( $_REQUEST['DYN_UID'] )?$_REQUEST['DYN_UID']:'';
|
|
||||||
|
|
||||||
$aFields = getVarsGrid();
|
$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
|
||||||
|
$dynUid= isset( $_REQUEST['DYN_UID'] )?$_REQUEST['DYN_UID']:'';
|
||||||
|
|
||||||
|
$aFields = getVarsGrid($proUid, $dynUid);
|
||||||
|
|
||||||
$aVariables = array();
|
$aVariables = array();
|
||||||
|
|
||||||
foreach ($aFields as $key => $value) {
|
foreach ($aFields as $key => $value) {
|
||||||
$aVariables[] = $aFields[$key];
|
$aVariables[] = $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo Bootstrap::json_encode( $aVariables );
|
echo Bootstrap::json_encode( $aVariables );
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user