mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Addressbook: Allow to choose the target addressbook when importing
This commit is contained in:
parent
14dcad566b
commit
115ca40737
@ -446,7 +446,20 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
||||
*/
|
||||
public function get_options_etpl(importexport_definition &$definition=null)
|
||||
{
|
||||
// lets do it!
|
||||
$contacts = new EGroupware\Api\Contacts();
|
||||
$options = array(
|
||||
'name' => 'addressbook.import_csv',
|
||||
'content' => array(
|
||||
'owner_from_csv' => $definition->plugin_options['owner_from_csv'],
|
||||
'owner' => $definition->plugin_options['contact_owner'] == 'personal' ?
|
||||
$GLOBALS['egw_info']['user']['account_id'] :
|
||||
$definition->plugin_options['contact_owner']
|
||||
),
|
||||
'sel_options' => array(
|
||||
'owner' => $contacts->get_addressbooks(Api\Acl::ADD)
|
||||
)
|
||||
);
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
|
9
addressbook/templates/default/import_csv.xet
Normal file
9
addressbook/templates/default/import_csv.xet
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
|
||||
<overlay>
|
||||
<template id="addressbook.import_csv" template="" lang="" group="0" version="1.9.001">
|
||||
<et2-select id="owner" label="Addressbook" class="et2-label-fixed"></et2-select>
|
||||
<et2-checkbox id="owner_from_csv" label="Use field from CSV if possible"></et2-checkbox>
|
||||
<template id="importexport.import_dialog.csv"/>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user