Merge remote-tracking branch 'pm_wysiwyg/pm_wysiwyg' into pm_wysiwyg
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
|
||||||
{
|
{
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,6 +456,51 @@ 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;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -552,6 +552,36 @@ 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($proUid, $dynUid);
|
||||||
|
|
||||||
|
$aVariables = array();
|
||||||
|
|
||||||
|
foreach ($aFields as $key => $value) {
|
||||||
|
$aVariables[] = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo Bootstrap::json_encode( $aVariables );
|
||||||
|
break;
|
||||||
/*
|
/*
|
||||||
case 'saveFile':
|
case 'saveFile':
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
|
|||||||
Reference in New Issue
Block a user