Skip to content
Snippets Groups Projects

Support für Dropdowns mit Lookup - task #4630

Merged Hahn Axel (hahn) requested to merge rollout-plugins into master
1 file
+ 15
4
Compare changes
  • Side-by-side
  • Inline
@@ -224,10 +224,22 @@ class rollout_base implements iRolloutplugin{
} else {
$aEffectiveConfig=$this->getConfig($sPhase);
// echo $sKey.' ... '; print_r($aEffectiveConfig[$sVarname]); echo '<br>';
// mark entry as active ... for select and radio
if(isset($aEffectiveConfig[$sVarname]) && isset($aCallbackData[$aEffectiveConfig[$sVarname]])){
$aCallbackData[$aEffectiveConfig[$sVarname]]['selected']='selected';
// wenn value = defaultvalue, dann value auf '' setzen
$aCallbackData[$aEffectiveConfig[$sVarname]]['checked']='checked';
$aCallbackData[$aEffectiveConfig[$sVarname]]['label'].=' <<<';
} elseif ($aVarinfos['type']==='select') {
$aCallbackData=array_merge(array('NO_SELECTED_ITEM_YET'=>array('value'=>'', 'label'=>'...')), $aCallbackData);
}
// wenn value = defaultvalue, dann value auf '' setzen (damit bei Default vom Scope
// davor ein Leerstring übergeben wird - analog onfocusout im Text Input
if (isset($aCallbackData[$aDefaultValues[$sVarname]])){
$aCallbackData[$aDefaultValues[$sVarname]]['value']='';
$aCallbackData[$aDefaultValues[$sVarname]]['label'].=' (*)';
}
// print_r($aCallbackData[$sVarname]); echo "<br>";
}
// echo '<pre>'.$sCallbackfunktion .' = '. print_r($aMydata,1 ).'</pre>';
@@ -247,11 +259,11 @@ class rollout_base implements iRolloutplugin{
// 'required' => 'required',
'validate' => 'isastring',
// 'size' => 25,
// 'placeholder' => (isset($this->_aCfgGlobal[$sVarname]) ? $this->_aCfgGlobal[$sVarname] : '') . ' | '.$aDefaultValues[$sVarname],
'placeholder' => $sMyPlaceholder
);
break;
case "select":
case "radio":
$aOptions=$aCallbackData;
$aFormdata[]=array(
'type' => $aVarinfos['type'],
@@ -262,7 +274,7 @@ class rollout_base implements iRolloutplugin{
'validate' => 'isastring',
'options' => $aOptions,
'placeholder' => $sMyPlaceholder
// 'placeholder' => $sMyPlaceholder
);
break;
case "text":
@@ -281,7 +293,6 @@ class rollout_base implements iRolloutplugin{
// 'required' => 'required',
'validate' => 'isastring',
// 'size' => 25,
// 'placeholder' => (isset($this->_aCfgGlobal[$sVarname]) ? $this->_aCfgGlobal[$sVarname] : '') . ' | '.$aDefaultValues[$sVarname],
'placeholder' => $sMyPlaceholder
);
break;
Loading