Commit 74e79514 authored by yched's avatar yched

#113381 - restore simple dropdown widget for non multiple noderef and userref fields

 - patch by quicksketch
parent 8af69b73
......@@ -216,7 +216,7 @@ function nodereference_widget($op, &$node, $field, &$items) {
'#title' => t($field['widget']['label']),
'#default_value' => $items['default nids'],
'#multiple' => $field['multiple'],
'#size' => min(count($options), 6),
'#size' => $field['multiple'] ? min(count($options), 6) : 0,
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
......
......@@ -157,7 +157,7 @@ function userreference_widget($op, &$node, $field, &$items) {
'#title' => t($field['widget']['label']),
'#default_value' => $items['default uids'],
'#multiple' => $field['multiple'],
'#size' => min(count($options), 6),
'#size' => $field['multiple'] ? min(count($options), 6) : 0,
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment