Fix select options with label & title not always working in rows

This commit is contained in:
Nathan Gray 2013-06-19 15:14:56 +00:00
parent 3162247d90
commit 625dae0c59

View File

@ -2065,12 +2065,21 @@ class etemplate_old extends boetemplate
$sels += $cell['sel_options']; $sels += $cell['sel_options'];
} }
} }
$explode_needed = true;
if (($options = $this->sel_options[$name]) && is_array($options) || if (($options = $this->sel_options[$name]) && is_array($options) ||
($options = self::get_array($this->sel_options, $name)) && is_array($options)) ($options = self::get_array($this->sel_options, $name)) && is_array($options))
{ {
$sels += $options; if(count($options) == 2 && $options['label'] && $options['title'])
{
// In too far - need to back up
} }
else else
{
$sels += $options;
$explode_needed = false;
}
}
if($explode_needed)
{ {
$name_parts = explode('[',str_replace(']','',$name)); $name_parts = explode('[',str_replace(']','',$name));
if (count($name_parts)) if (count($name_parts))