PM-31
Refactor output document / 0016759: Output Document pmGrids 0016760: Output Document Variables Se agrego "Grid variables" a las opciones de Type Variable en el pmVariablePicker, que despliega los campos de las grillas que tiene en el proceso
This commit is contained in:
@@ -428,17 +428,19 @@ function getDynaformsVars ($sProcessUID, $typeVars = 'all', $bIncMulSelFields =
|
||||
$oData->next();
|
||||
while ($aRowd = $oData->getRow()) {
|
||||
$dynaform = G::json_decode($aRowd['DYN_CONTENT'],true);
|
||||
$items = $dynaform['items'][0]['items'];
|
||||
foreach($items as $key => $val){
|
||||
if($val[0]['type'] == 'grid'){
|
||||
if(sizeof($val[0]['columns'])) {
|
||||
$columns = $val[0]['columns'];
|
||||
foreach($columns as $column) {
|
||||
array_push($aFields, array(
|
||||
"sName" => $column['name'],
|
||||
"sType" => $column['dataType'],
|
||||
"sLabel" => $column['name'] . " [" . $column['dataType']. "]"
|
||||
));
|
||||
if(is_array($dynaform) && sizeof($dynaform)) {
|
||||
$items = $dynaform['items'][0]['items'];
|
||||
foreach($items as $key => $val){
|
||||
if($val[0]['type'] == 'grid'){
|
||||
if(sizeof($val[0]['columns'])) {
|
||||
$columns = $val[0]['columns'];
|
||||
foreach($columns as $column) {
|
||||
array_push($aFields, array(
|
||||
"sName" => $column['name'],
|
||||
"sType" => $column['dataType'],
|
||||
"sLabel" => $column['name'] . " [" . $column['dataType']. "]"
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,18 @@ $html .= '<select name="type_variables" id="type_variables">';
|
||||
$html .= '<option value="all">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_ALL_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="system">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_SYSTEM_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="process">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_PROCESS_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="grid">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_GRID_VARIABLES' )).'</option>';
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(BpmnProjectPeer::PRJ_UID);
|
||||
$oCriteria->add(BpmnProjectPeer::PRJ_UID, $_REQUEST['sProcess']);
|
||||
$oDataset = ProcessPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
if (isset($row["PRJ_UID"])) {
|
||||
$html .= '<option value="grid">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_GRID_VARIABLES' )).'</option>';
|
||||
}
|
||||
|
||||
$html .= '</select> ';
|
||||
$html .= '</td>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user