2012-04-30 01:26:14 +04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<td id="importaddressbook_dialog" title="<?php echo $l->t("Import Addressbook"); ?>" colspan="6">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th><?php echo $l->t('Select address book to import to:') ?></th>
|
|
|
|
<td>
|
|
|
|
<select id="book" name="book" class="float">
|
|
|
|
<?php
|
2012-05-01 20:50:31 +04:00
|
|
|
$contacts_options = OC_Contacts_Addressbook::all(OCP\USER::getUser());
|
2012-05-07 01:00:36 +04:00
|
|
|
echo OCP\html_select_options($contacts_options, $contacts_options[0]['id'], array('value'=>'id', 'label'=>'displayname'));
|
2012-04-30 01:26:14 +04:00
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
<span id="import_drop_target" class="droptarget float"><?php echo $l->t("Drop a VCF file to import contacts."); ?> (Max. <?php echo $_['uploadMaxHumanFilesize']; ?>)</span>
|
|
|
|
<a class="svg upload float" title="<?php echo $l->t('Select from HD'); ?>"></a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2012-05-02 01:19:39 +04:00
|
|
|
<form id="import_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target">
|
2012-04-30 01:26:14 +04:00
|
|
|
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
|
|
|
|
<input id="import_upload_start" type="file" accept="text/*" name="importfile" />
|
|
|
|
<input id="close_button" style="float: left;" type="button" onclick="Contacts.UI.Addressbooks.cancel(this);" value="<?php echo $l->t("Cancel"); ?>">
|
|
|
|
<iframe name="import_upload_target" id='import_upload_target' src=""></iframe>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
<script type="text/javascript">
|
|
|
|
Contacts.UI.Addressbooks.loadImportHandlers();
|
|
|
|
</script>
|