suppress empty custom field selection

This commit is contained in:
Ralf Becker 2016-05-06 16:16:10 +00:00
parent fc2e620652
commit f70c828fbd

View File

@ -146,7 +146,8 @@ class addressbook_hooks
'xmlrpc' => True, 'xmlrpc' => True,
'admin' => false, 'admin' => false,
); );
$fileas_options = ExecMethod('api.EGroupware\\Api\\Contacts.fileas_options'); $contacts = new Api\Contacts();
$fileas_options = $contacts->fileas_options();
$settings['link_title'] = array( $settings['link_title'] = array(
'type' => 'select', 'type' => 'select',
'label' => 'Link title for contacts show', 'label' => 'Link title for contacts show',
@ -159,15 +160,18 @@ class addressbook_hooks
'admin' => false, 'admin' => false,
'default'=> 'org_name: n_family, n_given', 'default'=> 'org_name: n_family, n_given',
); );
$settings['link_title_cf'] = array( if (($cf_opts = Api\Contacts::cf_options()))
'type' => 'select', {
'label' => 'Add a customfield to link title', $settings['link_title_cf'] = array(
'name' => 'link_title_cf', 'type' => 'select',
'values' => Api\Contacts::cf_options(), 'label' => 'Add a customfield to link title',
'help' => 'Add customfield to links of addressbook, which displays in other applications. The default value is none customfield.', 'name' => 'link_title_cf',
'xmlrpc' => True, 'values' => $cf_opts,
'admin' => false, 'help' => 'Add customfield to links of addressbook, which displays in other applications. The default value is none customfield.',
); 'xmlrpc' => True,
'admin' => false,
);
}
$settings['addr_format'] = array( $settings['addr_format'] = array(
'type' => 'select', 'type' => 'select',
'label' => 'Default address format', 'label' => 'Default address format',