Fix chosen going crazy in filters by removing unwanted 'No fields' label.

Every selectbox (chosen) was binding to the one label, so any click in that area tried to open them all
This commit is contained in:
Nathan Gray 2014-07-08 17:35:14 +00:00
parent 15926a315f
commit d10dd0b6ed

View File

@ -48,8 +48,6 @@ class importexport_widget_filter extends etemplate_widget_transformer
unset($value['fields']);
$relative_dates = $this->attrs['relative_dates'];
$this->setElementAttribute($form_name, 'prefix', self::$prefix);
// Fallback, so there's something there...
if(!is_array($fields))
{
@ -61,6 +59,12 @@ class importexport_widget_filter extends etemplate_widget_transformer
return parent::beforeSendToClient($cname);
}
// Need to clear this if it's not needed. It causes Chosen selectboxes
// to bind to this label.
self::$transformation['label'] = '';
$this->setElementAttribute($form_name, 'prefix', self::$prefix);
$n = 1;
foreach($fields as $lname => &$field)
{