* Calendar - Allow specifying the charset when importing ical

This commit is contained in:
nathangray 2018-11-27 15:56:40 -07:00
parent 6ef91a5696
commit 0c5d8a5784
3 changed files with 36 additions and 2 deletions

View File

@ -346,7 +346,7 @@ class addressbook_import_vcard implements importexport_iface_import_plugin {
'name' => 'addressbook.import_vcard',
'content' => array(
'file_type' => 'vcard,ical,vcf',
'vcard_charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset']
'charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset']
),
'sel_options' => array(
'charset' => Api\Translation::get_installed_charsets()

View File

@ -279,7 +279,17 @@ class calendar_import_ical implements importexport_iface_import_plugin {
* )
*/
public function get_options_etpl() {
// lets do it!
return array(
'name' => 'addressbook.import_vcard',
'content' => array(
'file_type' => 'ical',
'charset' => $GLOBALS['egw_info']['user']['preferences']['common']['csv_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="calendar.import_ical" 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>