fixed a typo in previous commit and get setting of value in typeOptions working

This commit is contained in:
Ralf Becker 2013-11-06 08:59:38 +00:00
parent c9f1a28702
commit e5f76db8a8

View File

@ -107,7 +107,7 @@ class etemplate_widget_menupopup extends etemplate_widget
}
// some widgets sub-types need some post-processing
// ToDo: move it together with preprocessing to clientside
switch ($this->type['attr'])
switch ($this->attrs['type'])
{
case 'select-dow':
$dow = 0;
@ -293,7 +293,7 @@ class etemplate_widget_menupopup extends etemplate_widget
* @param mixed $value=null value for readonly
* @return array with value => label pairs
*/
public static function typeOptions($widget_type, $legacy_options, &$no_lang=false, $readonly=false, $value=null)
public static function typeOptions($widget_type, $legacy_options, &$no_lang=false, $readonly=false, &$value=null)
{
list($rows,$type,$type2,$type3,$type4,$type5,$type6) = explode(',',$legacy_options);