* Addressbook - Allow specifying the charset when importing vcard

This commit is contained in:
nathangray 2018-11-27 15:40:28 -07:00
parent cde347a463
commit 6ef91a5696
2 changed files with 38 additions and 4 deletions

View File

@ -342,7 +342,17 @@ class addressbook_import_vcard implements importexport_iface_import_plugin {
* )
*/
public function get_options_etpl() {
// lets do it!
return array(
'name' => 'addressbook.import_vcard',
'content' => array(
'file_type' => 'vcard,ical,vcf',
'vcard_charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset']
),
'sel_options' => array(
'charset' => Api\Translation::get_installed_charsets()
),
'preserv' => array()
);
}
/**

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="addressbook.import_vcard" template="" lang="" group="0" version="1.9.001">
<grid>
<columns>
<column/>
<column width="180px"/>
</columns>
<rows>
<row>
<description value="Charset of file"/>
<menulist class="width180">
<menupopup id="charset" no_lang="1"/>
</menulist>
</row>
</rows>
</grid>
<styles>
.width180 select { width:150px;}
</styles>
</template>
</overlay>