mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-20 21:08:54 +01:00
backport of some of nathans bugfixes (r28977,r29155,r29162)
This commit is contained in:
parent
30cc33e3e2
commit
8c99f00c6b
@ -231,6 +231,9 @@ class ajax_select_widget
|
||||
if(is_numeric($value)) {
|
||||
$value = (string)$value;
|
||||
}
|
||||
if($value === null) {
|
||||
unset($options[$key]);
|
||||
}
|
||||
}
|
||||
$options = $GLOBALS['egw']->js->convert_phparray_jsarray("options['$name']", $options, true);
|
||||
$GLOBALS['egw']->js->set_onload("if(!options) {
|
||||
@ -239,7 +242,7 @@ class ajax_select_widget
|
||||
$options;\n
|
||||
ajax_select_widget_setup('$name', '$onchange', options['$name'], '" . $GLOBALS['egw_info']['flags']['currentapp'] . "');
|
||||
");
|
||||
$GLOBALS['egw']->js->validate_file('', 'ajax_select', 'etemplate');
|
||||
$GLOBALS['egw']->js->validate_file('.', 'ajax_select', 'etemplate');
|
||||
|
||||
return True; // no extra label
|
||||
}
|
||||
@ -250,6 +253,10 @@ class ajax_select_widget
|
||||
if(!is_array($value_in)) {
|
||||
$value_in = $extension_data['old_value'];
|
||||
}
|
||||
// Check for blur text left in
|
||||
if($extension_data['options']['id_field'] == self::ARRAY_KEY && $value_in['search'] == lang('Search...') ) {
|
||||
$value_in['search'] = '';
|
||||
}
|
||||
|
||||
// They typed something in, but didn't choose a result
|
||||
if(!$value_in['value'] && $value_in['search']) {
|
||||
|
Loading…
Reference in New Issue
Block a user