mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 16:38:52 +01:00
- Update importexport names/classes to reflect changes in importexport
- Use new wizard base class to simplify import definition wizard
This commit is contained in:
parent
a6887ae908
commit
6de19f924e
@ -1,314 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare - Wizzard for Adressbook CSV import
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package addressbook
|
||||
* @link http://www.egroupware.org
|
||||
* @author Cornelius Weiss <nelius@cwtech.de>
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT.'/addressbook/importexport/class.import_contacts_csv.inc.php');
|
||||
|
||||
class wizzard_import_contacts_csv extends import_contacts_csv
|
||||
{
|
||||
|
||||
var $steps;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->steps = array(
|
||||
'wizzard_step30' => lang('Load Sample file'),
|
||||
'wizzard_step40' => lang('Choose seperator and charset'),
|
||||
'wizzard_step50' => lang('Manage mapping'),
|
||||
'wizzard_step55' => lang('Edit conditions'),
|
||||
'wizzard_step60' => lang('Choose owner of imported data'),
|
||||
);
|
||||
}
|
||||
|
||||
function wizzard_step30(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
if($this->debug) error_log('addressbook.importexport.addressbook_csv_import::wizzard_step30->$content '.print_r($content,true));
|
||||
// return from step30
|
||||
if ($content['step'] == 'wizzard_step30')
|
||||
{
|
||||
switch (array_search('pressed', $content['button']))
|
||||
{
|
||||
case 'next':
|
||||
// Move sample file to temp
|
||||
if($content['file']['tmp_name']) {
|
||||
$csvfile = tempnam($GLOBALS['egw_info']['server']['temp_dir'],$content['plugin']."_");
|
||||
move_uploaded_file($content['file']['tmp_name'], $csvfile);
|
||||
$GLOBALS['egw']->session->appsession('csvfile','',$csvfile);
|
||||
}
|
||||
unset($content['file']);
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],1);
|
||||
case 'previous' :
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],-1);
|
||||
case 'finish':
|
||||
return 'wizzard_finish';
|
||||
default :
|
||||
return $this->wizzard_step30($content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
// init step30
|
||||
else
|
||||
{
|
||||
$content['msg'] = $this->steps['wizzard_step30'];
|
||||
$content['step'] = 'wizzard_step30';
|
||||
$preserv = $content;
|
||||
unset ($preserv['button']);
|
||||
$GLOBALS['egw']->js->set_onload("var btn = document.getElementById('exec[button][next]'); btn.attributes.removeNamedItem('onclick');");
|
||||
return 'addressbook.importexport_wizzard_samplefile';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* choose fieldseperator, charset and headerline
|
||||
*
|
||||
* @param array $content
|
||||
* @param array $sel_options
|
||||
* @param array $readonlys
|
||||
* @param array $preserv
|
||||
* @return string template name
|
||||
*/
|
||||
function wizzard_step40(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
if($this->debug) error_log('addressbook.importexport.addressbook_csv_import::wizzard_step40->$content '.print_r($content,true));
|
||||
// return from step40
|
||||
if ($content['step'] == 'wizzard_step40')
|
||||
{//error_log(serialize($GLOBALS['egw']->uidefinitions));
|
||||
switch (array_search('pressed', $content['button']))
|
||||
{
|
||||
case 'next':
|
||||
// Process sample file for fields
|
||||
if (($handle = fopen($GLOBALS['egw']->session->appsession('csvfile'), "rb")) !== FALSE) {
|
||||
$data = fgetcsv($handle, 8000, $content['fieldsep']);
|
||||
$content['csv_fields'] = translation::convert($data,$content['charset']);
|
||||
} elseif($content['plugin_options']['csv_fields']) {
|
||||
$content['csv_fields'] = $content['plugin_options']['csv_fields'];
|
||||
}
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],1);
|
||||
case 'previous' :
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],-1);
|
||||
case 'finish':
|
||||
return 'wizzard_finish';
|
||||
default :
|
||||
return $this->wizzard_step40($content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
// init step40
|
||||
else
|
||||
{
|
||||
$content['msg'] = $this->steps['wizzard_step40'];
|
||||
$content['step'] = 'wizzard_step40';
|
||||
|
||||
// If editing an existing definition, these will be in plugin_options
|
||||
if(!$content['fieldsep'] && $content['plugin_options']['fieldsep']) {
|
||||
$content['fieldsep'] = $content['plugin_options']['fieldsep'];
|
||||
} elseif (!$content['fieldsep']) {
|
||||
$content['fieldsep'] = ';';
|
||||
}
|
||||
if(!$content['charset'] && $content['plugin_options']['charset']) {
|
||||
$content['charset'] = $content['plugin_options']['charset'];
|
||||
}
|
||||
if(!$content['has_header_line'] && $content['plugin_options']['has_header_line']) {
|
||||
$content['num_header_lines'] = 1;
|
||||
}
|
||||
if(!$content['num_header_lines'] && $content['plugin_options']['num_header_lines']) {
|
||||
$content['num_header_lines'] = $content['plugin_options']['num_header_lines'];
|
||||
}
|
||||
|
||||
$sel_options['charset'] = $GLOBALS['egw']->translation->get_installed_charsets()+
|
||||
array('utf-8' => 'utf-8 (Unicode)');
|
||||
$preserv = $content;
|
||||
unset ($preserv['button']);
|
||||
return 'addressbook.importexport_wizzard_choosesepncharset';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function wizzard_step50(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
if($this->debug) error_log('addressbook.importexport.addressbook_csv_import::wizzard_step50->$content '.print_r($content,true));
|
||||
// return from step50
|
||||
if ($content['step'] == 'wizzard_step50')
|
||||
{
|
||||
array_shift($content['csv_fields']);
|
||||
array_shift($content['field_mapping']);
|
||||
array_shift($content['field_conversion']);
|
||||
|
||||
foreach($content['field_conversion'] as $field => $convert) {
|
||||
if(!trim($convert)) unset($content['field_conversion'][$field]);
|
||||
}
|
||||
|
||||
switch (array_search('pressed', $content['button']))
|
||||
{
|
||||
case 'next':
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],1);
|
||||
case 'previous' :
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],-1);
|
||||
case 'finish':
|
||||
return 'wizzard_finish';
|
||||
default :
|
||||
return $this->wizzard_step50($content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
// init step50
|
||||
else
|
||||
{
|
||||
$content['msg'] = $this->steps['wizzard_step50'];
|
||||
$content['step'] = 'wizzard_step50';
|
||||
|
||||
if(!$content['field_mapping'] && $content['plugin_options']) {
|
||||
$content['field_mapping'] = $content['plugin_options']['field_mapping'];
|
||||
$content['field_conversion'] = $content['plugin_options']['field_conversion'];
|
||||
}
|
||||
array_unshift($content['csv_fields'],array('row0'));
|
||||
array_unshift($content['field_mapping'],array('row0'));
|
||||
array_unshift($content['field_conversion'],array('row0'));
|
||||
|
||||
$j = 1;
|
||||
foreach ($content['csv_fields'] as $field)
|
||||
{
|
||||
if(strstr($field,'no_csv_')) $j++;
|
||||
}
|
||||
while ($j <= 3)
|
||||
{
|
||||
$content['csv_fields'][] = 'no_csv_'.$j;
|
||||
$content['field_mapping'][] = $content['field_conversion'][] = '';
|
||||
$j++;
|
||||
}
|
||||
$bocontacts = new addressbook_bo();
|
||||
$contact_fields = $bocontacts->contact_fields;
|
||||
foreach($bocontacts->customfields as $name => $data) {
|
||||
$contact_fields['#'.$name] = $data['label'];
|
||||
}
|
||||
unset($contact_fields['jpegphoto']); // can't cvs import that
|
||||
$sel_options['field_mapping'] = array('' => lang('none')) + $contact_fields;
|
||||
$content['msg'] .= "\n*" . lang('Contact ID cannot be changed by import');
|
||||
$preserv = $content;
|
||||
unset ($preserv['button']);
|
||||
return 'addressbook.importexport_wizzard_fieldmaping';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit conditions
|
||||
*/
|
||||
function wizzard_step55(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
if($this->debug) error_log('addressbook.wizzard_import_contacts_csv->$content '.print_r($content,true));
|
||||
// return from step55
|
||||
if ($content['step'] == 'wizzard_step55')
|
||||
{
|
||||
array_shift($content['conditions']);
|
||||
|
||||
foreach($content['conditions'] as $key => &$condition) {
|
||||
// Clear empties
|
||||
if($condition['string'] == '') {
|
||||
unset($content['conditions'][$key]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
switch (array_search('pressed', $content['button']))
|
||||
{
|
||||
case 'next':
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],1);
|
||||
case 'previous' :
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],-1);
|
||||
case 'finish':
|
||||
return 'wizzard_finish';
|
||||
case 'add':
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],0);
|
||||
default :
|
||||
return $this->wizzard_step55($content,$sel_options,$readonlys,$preserv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// init step55
|
||||
$content['msg'] = $this->steps['wizzard_step55'];
|
||||
$content['step'] = 'wizzard_step55';
|
||||
|
||||
if(!$content['conditions'] && $content['plugin_options']['conditions']) {
|
||||
$content['conditions'] = $content['plugin_options']['conditions'];
|
||||
}
|
||||
|
||||
$bocontacts = new addressbook_bo();
|
||||
$contact_fields = $bocontacts->contact_fields;
|
||||
$sel_options['string'][''] = 'None';
|
||||
foreach($bocontacts->customfields as $name => $data) {
|
||||
$contact_fields['#'.$name] = $data['label'];
|
||||
}
|
||||
foreach($content['field_mapping'] as $field) {
|
||||
$sel_options['string'][$field] = $contact_fields[$field];
|
||||
}
|
||||
$sel_options['type'] = array_combine(self::$conditions, self::$conditions);
|
||||
$sel_options['action'] = array_combine(self::$actions, self::$actions);
|
||||
|
||||
// Make 3 empty conditions
|
||||
$j = 1;
|
||||
foreach ($content['conditions'] as $condition)
|
||||
{
|
||||
if(!$condition['string']) $j++;
|
||||
}
|
||||
while ($j <= 3)
|
||||
{
|
||||
$content['conditions'][] = array('string' => '');
|
||||
$j++;
|
||||
}
|
||||
|
||||
// Leave room for heading
|
||||
array_unshift($content['conditions'], false);
|
||||
|
||||
$preserv = $content;
|
||||
unset ($preserv['button']);
|
||||
return 'addressbook.importexport_wizzard_conditions';
|
||||
}
|
||||
|
||||
function wizzard_step60(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
if($this->debug) error_log('addressbook.importexport.addressbook_csv_import::wizzard_step60->$content '.print_r($content,true));
|
||||
// return from step60
|
||||
if ($content['step'] == 'wizzard_step60')
|
||||
{
|
||||
switch (array_search('pressed', $content['button']))
|
||||
{
|
||||
case 'next':
|
||||
unset($content['csv_fields']);
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],1);
|
||||
case 'previous' :
|
||||
return $GLOBALS['egw']->uidefinitions->get_step($content['step'],-1);
|
||||
case 'finish':
|
||||
return 'wizzard_finish';
|
||||
default :
|
||||
return $this->wizzard_step60($content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
// init step60
|
||||
else
|
||||
{
|
||||
$content['msg'] = $this->steps['wizzard_step60'];
|
||||
$content['step'] = 'wizzard_step60';
|
||||
|
||||
if(!$content['contact_owner'] && $content['plugin_options']) {
|
||||
$content['contact_owner'] = $content['plugin_options']['contact_owner'];
|
||||
}
|
||||
|
||||
$bocontacts = new addressbook_bo();
|
||||
$sel_options['contact_owner'] = $bocontacts->get_addressbooks(EGW_ACL_ADD);
|
||||
|
||||
$preserv = $content;
|
||||
unset ($preserv['button']);
|
||||
return 'addressbook.importexport_wizzard_chooseowner';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
<entry type="array" name="outlook_csv_english">
|
||||
<entry type="string" name="name">outlook_csv_english</entry>
|
||||
<entry type="string" name="application">addressbook</entry>
|
||||
<entry type="string" name="plugin">export_contacts_csv</entry>
|
||||
<entry type="string" name="plugin">addressbook_export_contacts_csv</entry>
|
||||
<entry type="string" name="type">export</entry>
|
||||
<entry type="array" name="allowed_users">
|
||||
<entry type="string" name="0">Default</entry>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<entry type="array" name="outlook_csv_finish">
|
||||
<entry type="string" name="name">outlook_csv_finish</entry>
|
||||
<entry type="string" name="application">addressbook</entry>
|
||||
<entry type="string" name="plugin">export_contacts_csv</entry>
|
||||
<entry type="string" name="plugin">addressbook_export_contacts_csv</entry>
|
||||
<entry type="string" name="type">export</entry>
|
||||
<entry type="array" name="allowed_users">
|
||||
<entry type="string" name="0">Default</entry>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<entry type="array" name="outlook_csv_french">
|
||||
<entry type="string" name="name">outlook_csv_french</entry>
|
||||
<entry type="string" name="application">addressbook</entry>
|
||||
<entry type="string" name="plugin">export_contacts_csv</entry>
|
||||
<entry type="string" name="plugin">addressbook_export_contacts_csv</entry>
|
||||
<entry type="string" name="type">export</entry>
|
||||
<entry type="array" name="allowed_users">
|
||||
<entry type="string" name="0">Default</entry>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<entry type="array" name="outlook_csv_import_german">
|
||||
<entry type="string" name="name">outlook_csv_import_german</entry>
|
||||
<entry type="string" name="application">addressbook</entry>
|
||||
<entry type="string" name="plugin">import_contacts_csv</entry>
|
||||
<entry type="string" name="plugin">addressbook_import_contacts_csv</entry>
|
||||
<entry type="string" name="type">import</entry>
|
||||
<entry type="array" name="allowed_users">
|
||||
<entry type="string" name="0">Default</entry>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<entry type="array" name="outlook_csv_italien">
|
||||
<entry type="string" name="name">outlook_csv_italien</entry>
|
||||
<entry type="string" name="application">addressbook</entry>
|
||||
<entry type="string" name="plugin">export_contacts_csv</entry>
|
||||
<entry type="string" name="plugin">addressbook_export_contacts_csv</entry>
|
||||
<entry type="string" name="type">export</entry>
|
||||
<entry type="array" name="allowed_users">
|
||||
<entry type="string" name="0">Default</entry>
|
||||
|
@ -11,13 +11,11 @@
|
||||
* @version $Id: class.egw_addressbook_record.inc.php 22827 2006-11-10 15:35:35Z nelius_weiss $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_egw_record.inc.php');
|
||||
|
||||
/**
|
||||
* class egw_addressbook_record
|
||||
* class addressbook_egw_record
|
||||
* compability layer for iface_egw_record needet for importexport
|
||||
*/
|
||||
class egw_addressbook_record implements iface_egw_record
|
||||
class addressbook_egw_record implements importexport_iface_egw_record
|
||||
{
|
||||
|
||||
private $identifier = '';
|
@ -11,21 +11,17 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.export_csv.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_export_plugin.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/addressbook/importexport/class.egw_addressbook_record.inc.php');
|
||||
|
||||
/**
|
||||
* export plugin of addressbook
|
||||
*/
|
||||
class export_contacts_csv implements iface_export_plugin {
|
||||
class addressbook_export_contacts_csv implements importexport_iface_export_plugin {
|
||||
|
||||
/**
|
||||
* Exports records as defined in $_definition
|
||||
*
|
||||
* @param egw_record $_definition
|
||||
*/
|
||||
public function export( $_stream, definition $_definition) {
|
||||
public function export( $_stream, importexport_definition $_definition) {
|
||||
$options = $_definition->plugin_options;
|
||||
|
||||
$uicontacts = new addressbook_ui();
|
||||
@ -43,13 +39,13 @@ class export_contacts_csv implements iface_export_plugin {
|
||||
$selection = explode(',',$options['selection']);
|
||||
}
|
||||
|
||||
$export_object = new export_csv($_stream, (array)$options);
|
||||
$export_object = new importexport_export_csv($_stream, (array)$options);
|
||||
$export_object->set_mapping($options['mapping']);
|
||||
|
||||
// $options['selection'] is array of identifiers as this plugin doesn't
|
||||
// support other selectors atm.
|
||||
foreach ($selection as $identifier) {
|
||||
$contact = new egw_addressbook_record($identifier);
|
||||
$contact = new addressbook_egw_record($identifier);
|
||||
$export_object->export_record($contact);
|
||||
unset($contact);
|
||||
}
|
||||
@ -97,6 +93,6 @@ class export_contacts_csv implements iface_export_plugin {
|
||||
*
|
||||
*/
|
||||
public function get_selectors_etpl() {
|
||||
return '<b>Selectors:</b>';
|
||||
return 'addressbook.export_csv_selectors';
|
||||
}
|
||||
}
|
@ -10,14 +10,11 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_import_plugin.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT.'/importexport/inc/class.import_csv.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
* class import_csv for addressbook
|
||||
*/
|
||||
class import_contacts_csv implements iface_import_plugin {
|
||||
class addressbook_import_contacts_csv implements importexport_iface_import_plugin {
|
||||
|
||||
private static $plugin_options = array(
|
||||
'fieldsep', // char
|
||||
@ -101,8 +98,8 @@ class import_contacts_csv implements iface_import_plugin {
|
||||
* @param string $_charset
|
||||
* @param definition $_definition
|
||||
*/
|
||||
public function import( $_stream, definition $_definition ) {
|
||||
$import_csv = new import_csv( $_stream, array(
|
||||
public function import( $_stream, importexport_definition $_definition ) {
|
||||
$import_csv = new importexport_import_csv( $_stream, array(
|
||||
'fieldsep' => $_definition->plugin_options['fieldsep'],
|
||||
'charset' => $_definition->plugin_options['charset'],
|
||||
));
|
||||
@ -239,7 +236,9 @@ class import_contacts_csv implements iface_import_plugin {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
case 'delete' :
|
||||
default:
|
||||
throw new egw_exception('Unsupported action');
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare - Wizard for Adressbook CSV import
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package addressbook
|
||||
* @link http://www.egroupware.org
|
||||
* @author Cornelius Weiss <nelius@cwtech.de>
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
class addressbook_wizard_import_contacts_csv extends importexport_wizard_basic_import_csv
|
||||
{
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->steps += array(
|
||||
'wizard_step50' => lang('Manage mapping'),
|
||||
'wizard_step60' => lang('Choose owner of imported data'),
|
||||
);
|
||||
|
||||
// Field mapping
|
||||
$bocontacts = new addressbook_bo();
|
||||
$this->mapping_fields = $bocontacts->contact_fields;
|
||||
foreach($bocontacts->customfields as $name => $data) {
|
||||
$this->mapping_fields['#'.$name] = $data['label'];
|
||||
}
|
||||
unset($this->mapping_fields['jpegphoto']); // can't cvs import that
|
||||
|
||||
// Actions
|
||||
$this->actions = array(
|
||||
'none' => lang('none'),
|
||||
'update' => lang('update'),
|
||||
'insert' => lang('insert'),
|
||||
'delete' => lang('delete'),
|
||||
);
|
||||
|
||||
// Conditions
|
||||
$this->conditions = array(
|
||||
'exists' => lang('exists'),
|
||||
);
|
||||
}
|
||||
|
||||
function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
$result = parent::wizard_step50($content, $sel_options, $readonlys, $preserv);
|
||||
$content['msg'] .= "\n*" . lang('Contact ID cannot be changed by import');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function wizard_step60(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||
{
|
||||
if($this->debug) error_log('addressbook.importexport.addressbook_csv_import::wizard_step60->$content '.print_r($content,true));
|
||||
// return from step60
|
||||
if ($content['step'] == 'wizard_step60')
|
||||
{
|
||||
switch (array_search('pressed', $content['button']))
|
||||
{
|
||||
case 'next':
|
||||
unset($content['csv_fields']);
|
||||
return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],1);
|
||||
case 'previous' :
|
||||
return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],-1);
|
||||
case 'finish':
|
||||
return 'wizard_finish';
|
||||
default :
|
||||
return $this->wizard_step60($content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
}
|
||||
// init step60
|
||||
else
|
||||
{
|
||||
$content['msg'] = $this->steps['wizard_step60'];
|
||||
$content['step'] = 'wizard_step60';
|
||||
|
||||
if(!$content['contact_owner'] && $content['plugin_options']) {
|
||||
$content['contact_owner'] = $content['plugin_options']['contact_owner'];
|
||||
}
|
||||
|
||||
$bocontacts = new addressbook_bo();
|
||||
$sel_options['contact_owner'] = $bocontacts->get_addressbooks(EGW_ACL_ADD);
|
||||
|
||||
$preserv = $content;
|
||||
unset ($preserv['button']);
|
||||
return 'addressbook.importexport_wizard_chooseowner';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* eGroupWare - eTemplates for Application addressbook
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2010-03-01 16:26
|
||||
* generated by soetemplate::dump4setup() 2010-03-11 10:10
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package addressbook
|
||||
@ -66,17 +66,7 @@ $templ_data[] = array('name' => 'addressbook.email.rows','template' => '','lang'
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.export_csv_options','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Seperator";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:1:"1";s:4:"name";s:9:"seperator";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Enclosure";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:1:"1";s:4:"name";s:9:"enclosure";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1160148382',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizzard_chooseowner','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"select";s:4:"name";s:13:"contact_owner";s:4:"size";s:4:"None";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1146646360',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizzard_choosesepncharset','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:1:"B";s:5:"180px";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Fieldseperator";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"fieldsep";s:4:"size";s:1:"1";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:15:"Charset of file";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:7:"charset";s:4:"span";s:9:",width180";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Header lines to skip";}s:1:"B";a:3:{s:4:"type";s:3:"int";s:4:"name";s:16:"num_header_lines";s:4:"size";s:1:"0";}}}s:4:"rows";i:4;s:4:"cols";i:2;}}','size' => '','style' => '.width180 select { width:150px;}','modified' => '1145979153',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizzard_choosetype','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:11:"import_type";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1145977925',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizzard_conditions','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"vbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:6:"select";s:4:"name";s:14:"${row}[string]";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"${row}[type]";}i:2;a:2:{s:4:"type";s:4:"text";s:4:"name";s:12:"${row}[op_2]";}}s:1:"C";a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"${row}[true]";}s:1:"D";a:2:{s:4:"type";s:6:"select";s:4:"name";s:13:"${row}[false]";}}}s:4:"rows";i:1;s:4:"cols";i:4;s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"c1";s:2:"th";}i:1;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Field";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Condition";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:4:"span";s:1:"2";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:1:"2";s:5:"label";s:4:"True";s:5:"align";s:6:"center";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,2,0";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}i:2;a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Stop";s:5:"align";s:5:"right";}}}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:4:"span";s:1:"2";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:1:"2";s:5:"label";s:5:"False";s:5:"align";s:6:"center";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,2,0";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}i:2;a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Stop";s:5:"align";s:5:"right";}}}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:2;a:6:{s:1:"A";a:2:{s:4:"type";s:6:"select";s:4:"name";s:14:"${row}[string]";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"${row}[type]";}i:2;a:2:{s:4:"type";s:4:"text";s:4:"name";s:12:"${row}[op_2]";}}s:1:"C";a:2:{s:4:"type";s:6:"select";s:4:"name";s:20:"${row}[true][action]";}s:1:"D";a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:18:"${row}[true][stop]";}s:1:"E";a:2:{s:4:"type";s:6:"select";s:4:"name";s:21:"${row}[false][action]";}s:1:"F";a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:19:"${row}[false][stop]";}}}s:4:"rows";i:2;s:4:"cols";i:6;s:4:"name";s:10:"conditions";s:7:"options";a:0:{}}i:2;a:5:{s:4:"type";s:6:"button";s:4:"name";s:3:"add";s:5:"label";s:3:"add";s:4:"help";s:59:"This causes a segfault... haven\'t figured out how to fix it";s:8:"disabled";s:1:"1";}}}','size' => '','style' => '','modified' => '1266963791',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizzard_fieldmaping','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"span";s:3:"all";}}i:2;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"c1";s:2:"th";}i:1;a:4:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"CSV Field";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Addressbook Field";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Translation";}}i:2;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"${row}";s:7:"no_lang";s:1:"1";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"name";s:16:"csv_fields[$row]";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:19:"field_mapping[$row]";}s:1:"D";a:2:{s:4:"type";s:4:"text";s:4:"name";s:22:"field_conversion[$row]";}}}s:4:"rows";i:2;s:4:"cols";i:4;s:4:"size";s:10:",,,,,,auto";s:7:"options";a:1:{i:6;s:4:"auto";}}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1146036809',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizzard_samplefile','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1146650510',);
|
||||
$templ_data[] = array('name' => 'addressbook.importexport_wizard_chooseowner','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"select";s:4:"name";s:13:"contact_owner";s:4:"size";s:4:"None";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1268327427',);
|
||||
|
||||
$templ_data[] = array('name' => 'addressbook.index','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:22:"addressbook.index.left";}s:1:"B";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:27:"addressbook.index.right_add";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:22:"addressbook.index.rows";s:4:"name";s:2:"nm";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:4:"name";s:3:"add";s:5:"label";s:3:"Add";s:4:"help";s:17:"Add a new contact";s:7:"onclick";s:168:"window.open(egw::link(\'/index.php\',\'menuaction=addressbook.addressbook_ui.edit\'),\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\'); return false;";}s:1:"B";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"use_all";s:5:"label";s:11:"whole query";s:8:"onchange";s:126:"if (this.checked==true && !confirm(\'Apply the action on the whole query, NOT only the shown contacts!!!\')) this.checked=false;";s:4:"help";s:67:"Apply the action on the whole query, NOT only the shown contacts!!!";}i:2;a:6:{s:4:"type";s:6:"select";s:8:"onchange";s:16:"do_action(this);";s:4:"size";s:45:"Select an action or addressbook to move to...";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"action";s:4:"help";s:42:"Select an action or addressbook to move to";}i:3;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1243585623',);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user