WYSIWYG EDITOR get grids
WYSIWYG EDITOR get grids
This commit is contained in:
@@ -432,6 +432,7 @@ function getGridsVars ($sProcessUID)
|
|||||||
{
|
{
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
$aFieldsNames = array ();
|
$aFieldsNames = array ();
|
||||||
|
|
||||||
require_once 'classes/model/Dynaform.php';
|
require_once 'classes/model/Dynaform.php';
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( DynaformPeer::DYN_FILENAME );
|
$oCriteria->addSelectColumn( DynaformPeer::DYN_FILENAME );
|
||||||
@@ -445,8 +446,7 @@ function getGridsVars ($sProcessUID)
|
|||||||
foreach ($G_FORM->fields as $k => $v) {
|
foreach ($G_FORM->fields as $k => $v) {
|
||||||
if ($v->type == 'grid') {
|
if ($v->type == 'grid') {
|
||||||
if (! in_array( $k, $aFieldsNames )) {
|
if (! in_array( $k, $aFieldsNames )) {
|
||||||
$aFields[] = array ('sName' => $k,'sXmlForm' => str_replace( $sProcessUID . '/', '', $v->xmlGrid )
|
$aFields[] = array ('sName' => $k,'sXmlForm' => str_replace( $sProcessUID . '/', '', $v->xmlGrid ));
|
||||||
);
|
|
||||||
$aFieldsNames[] = $k;
|
$aFieldsNames[] = $k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -457,6 +457,22 @@ function getGridsVars ($sProcessUID)
|
|||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getVarsGrid ()
|
||||||
|
{
|
||||||
|
$aFields = array ();
|
||||||
|
$aFieldsNames = array ();
|
||||||
|
require_once 'classes/model/Dynaform.php';
|
||||||
|
|
||||||
|
|
||||||
|
$aFields = new Dynaform();
|
||||||
|
//$aFields->getDynaformFields( $caseId );
|
||||||
|
|
||||||
|
$aFields->getDynaformFields( '45855056550a69a8cbeed24036053462' );
|
||||||
|
|
||||||
|
G::pr($aFields);
|
||||||
|
return $aFields;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class XmlForm_Field_CheckBoxTable
|
* Class XmlForm_Field_CheckBoxTable
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -552,6 +552,33 @@ try {
|
|||||||
$_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
|
$_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
|
||||||
echo G::LoadTranslation($_REQUEST['prefix']);
|
echo G::LoadTranslation($_REQUEST['prefix']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'getGridList':
|
||||||
|
G::LoadClass('xmlfield_InputPM');
|
||||||
|
$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
|
||||||
|
|
||||||
|
$aFields = getGridsVars( $proUid );
|
||||||
|
|
||||||
|
$aVariables = array();
|
||||||
|
foreach ($aFields as $key => $value){
|
||||||
|
$aVariables[] = $aFields[$key];
|
||||||
|
}
|
||||||
|
echo Bootstrap::json_encode( $aVariables );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'getVariableGrid':
|
||||||
|
G::LoadClass('xmlfield_InputPM');
|
||||||
|
//$proUid= isset( $_REQUEST['PRO_UID'] )?$_REQUEST['PRO_UID']:'';
|
||||||
|
//$dynUid= isset( $_REQUEST['DYN_UID'] )?$_REQUEST['DYN_UID']:'';
|
||||||
|
|
||||||
|
$aFields = getVarsGrid();
|
||||||
|
|
||||||
|
$aVariables = array();
|
||||||
|
foreach ($aFields as $key => $value){
|
||||||
|
$aVariables[] = $aFields[$key];
|
||||||
|
}
|
||||||
|
echo Bootstrap::json_encode( $aVariables );
|
||||||
|
break;
|
||||||
/*
|
/*
|
||||||
case 'saveFile':
|
case 'saveFile':
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
|
|||||||
Reference in New Issue
Block a user