MDL-57807 mod_data: Advanced search with menu item.

It is now possible to search other criteria without first
setting the menu items.

Thanks to Sergey Gorbatov for providing this patch.
This commit is contained in:
Adrian Greeve 2017-04-26 13:36:53 +08:00
parent 5ccddd27df
commit 0a497898c5

View File

@ -104,7 +104,8 @@ class data_field_menu extends data_field_base {
$return = html_writer::label(get_string('fieldtypelabel', "datafield_" . $this->type),
'menuf_' . $this->field->id, false, array('class' => 'accesshide'));
$return .= html_writer::select($options, 'f_'.$this->field->id, $content, array('class' => 'custom-select'));
$return .= html_writer::select($options, 'f_'.$this->field->id, $content, array('' => get_string('menuchoose', 'data')),
array('class' => 'custom-select'));
return $return;
}