Fix validation of selectboxes when options are specified as key => (label,title).

Fixes edit dialog actions not validating
This commit is contained in:
Nathan Gray 2014-01-20 16:15:53 +00:00
parent d0e562ebef
commit 2123b7cbbf

View File

@ -294,6 +294,12 @@ class etemplate_widget_menupopup extends etemplate_widget
{
$values[] = $val['value'];
}
else if ((isset($val['label']) || isset($val['title'])) && count($val) == 1 ||
isset($val['title']) && isset($val['label']) && count($val) == 2)
{
// key => {label, title}
$values[] = $key;
}
else // optgroup
{
foreach($val as $k => $v)