Merge pull request #205 from julceslauhub/master
BUG 9287 The variable picker for the trigger editor does not show grid variables in the list
This commit is contained in:
@@ -361,7 +361,7 @@ class XmlForm_Field_hours extends XmlForm_Field_SimpleText
|
|||||||
* @parameter boolean $bSystemVars
|
* @parameter boolean $bSystemVars
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getDynaformsVars($sProcessUID, $bSystemVars = true, $bIncMulSelFields = false)
|
function getDynaformsVars($sProcessUID, $bSystemVars = true, $bIncMulSelFields = 0)
|
||||||
{
|
{
|
||||||
$aFields = array();
|
$aFields = array();
|
||||||
$aFieldsNames = array();
|
$aFieldsNames = array();
|
||||||
@@ -375,7 +375,7 @@ class XmlForm_Field_hours extends XmlForm_Field_SimpleText
|
|||||||
}
|
}
|
||||||
$aInvalidTypes = array('title', 'subtitle', 'link', 'file', 'button', 'reset', 'submit', 'javascript');
|
$aInvalidTypes = array('title', 'subtitle', 'link', 'file', 'button', 'reset', 'submit', 'javascript');
|
||||||
$aMultipleSelectionFields = array('listbox', 'checkgroup', 'grid');
|
$aMultipleSelectionFields = array('listbox', 'checkgroup', 'grid');
|
||||||
if (!$bIncMulSelFields) {
|
if ($bIncMulSelFields != 0) {
|
||||||
$aInvalidTypes = array_merge($aInvalidTypes, $aMultipleSelectionFields);
|
$aInvalidTypes = array_merge($aInvalidTypes, $aMultipleSelectionFields);
|
||||||
}
|
}
|
||||||
require_once 'classes/model/Dynaform.php';
|
require_once 'classes/model/Dynaform.php';
|
||||||
@@ -395,7 +395,7 @@ class XmlForm_Field_hours extends XmlForm_Field_SimpleText
|
|||||||
if (!in_array($k, $aFieldsNames)) {
|
if (!in_array($k, $aFieldsNames)) {
|
||||||
$aFields[] = array('sName' => $k,
|
$aFields[] = array('sName' => $k,
|
||||||
'sType' => $v->type,
|
'sType' => $v->type,
|
||||||
'sLabel'=> $v->label
|
'sLabel'=> ($v->type != 'grid' ? $v->label : '[ ' . G::LoadTranslation('ID_GRID') . ' ]')
|
||||||
);
|
);
|
||||||
$aFieldsNames[] = $k;
|
$aFieldsNames[] = $k;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ var changeVariables = function(varType,proUid,field,symbol,target) {
|
|||||||
url : '../controls/varsAjaxByType',
|
url : '../controls/varsAjaxByType',
|
||||||
async : true,
|
async : true,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
args : "type="+varType+"&sProcess="+proUid+"&sFieldName="+field+"&sSymbol="+symbol+"&bIncMulSelFields=1"
|
args : "type="+varType+"&sProcess="+proUid+"&sFieldName="+field+"&sSymbol="+symbol+"&bIncMulSelFields=0"
|
||||||
});
|
});
|
||||||
|
|
||||||
oRPC.callback = function(rpc){
|
oRPC.callback = function(rpc){
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass('xmlfield_InputPM');
|
||||||
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? (boolean)$_POST['bIncMulSelFields'] : false);
|
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0);
|
||||||
|
|
||||||
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count($aFields) . '" style="width:100%;' . (! isset($_POST['sNoShowLeyend']) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count($aFields) . '" style="width:100%;' . (! isset($_POST['sNoShowLeyend']) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
||||||
foreach ( $aFields as $aField ) {
|
foreach ( $aFields as $aField ) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass('xmlfield_InputPM');
|
||||||
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? (boolean)$_POST['bIncMulSelFields'] : false);
|
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0);
|
||||||
$aType = $_POST['type'];
|
$aType = $_POST['type'];
|
||||||
|
|
||||||
$aRows[0] = Array (
|
$aRows[0] = Array (
|
||||||
|
|||||||
Reference in New Issue
Block a user