Add empty_label to Select account custom field type, so you can select nothing.

This commit is contained in:
Nathan Gray 2015-10-13 16:04:20 +00:00
parent 44ee990874
commit 8b68269874
2 changed files with 9 additions and 2 deletions

View File

@ -188,7 +188,10 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
$sel_options[$lname] = lang($label); $sel_options[$lname] = lang($label);
$fields_with_vals[]=$lname; $fields_with_vals[]=$lname;
} }
$link_types = egw_link::app_list(); $link_types = array_intersect_key(egw_link::app_list('query'),egw_link::app_list('title'));
// Explicitly add in filemanager, which does not support query or title
$link_types['filemanager'] = lang('filemanager');
ksort($link_types); ksort($link_types);
foreach($link_types as $lname => $label) foreach($link_types as $lname => $label)
{ {

View File

@ -472,6 +472,10 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
return true; return true;
}, },
_setup_select_account: function(field_name, field, attrs) {
attrs.empty_label = egw.lang('Select');
return this._setup_select(field_name, field, attrs);
},
_setup_date: function(field_name, field, attrs) { _setup_date: function(field_name, field, attrs) {
attrs.data_format = 'Y-m-d'; attrs.data_format = 'Y-m-d';
return true; return true;