2012-04-29 21:26:14 +00: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.
|
|
|
|
*/
|
|
|
|
?>
|
2012-05-17 12:29:20 +00:00
|
|
|
<td id="importaddressbook_dialog" colspan="6">
|
2012-04-29 21:26:14 +00:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th><?php echo $l->t('Select address book to import to:') ?></th>
|
|
|
|
<td>
|
2012-05-17 12:29:20 +00: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-07-08 11:28:12 +00:00
|
|
|
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
|
2012-05-17 12:29:20 +00:00
|
|
|
<select id="book" name="book" class="float">
|
|
|
|
<?php
|
|
|
|
$contacts_options = OC_Contacts_Addressbook::all(OCP\USER::getUser());
|
|
|
|
echo OCP\html_select_options($contacts_options, $contacts_options[0]['id'], array('value'=>'id', 'label'=>'displayname'));
|
|
|
|
?>
|
|
|
|
</select>
|
2012-06-07 08:54:25 +00:00
|
|
|
<span id="import_drop_target" class="droptarget float"><?php echo $l->t("Drop a VCF file<br />to import contacts."); ?> (Max. <?php echo $_['uploadMaxHumanFilesize']; ?>)</span>
|
2012-05-17 12:29:20 +00:00
|
|
|
<a class="svg upload float" title="<?php echo $l->t('Select from HD'); ?>">
|
|
|
|
<input class="float" id="import_upload_start" type="file" accept="text/*" name="importfile" /></a>
|
|
|
|
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
|
|
|
|
</form>
|
2012-04-29 21:26:14 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2012-05-17 12:29:20 +00:00
|
|
|
|
2012-04-29 21:26:14 +00:00
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
<script type="text/javascript">
|
2012-06-07 18:28:28 +00:00
|
|
|
$(document).ready(function(){
|
|
|
|
Contacts.UI.Addressbooks.loadImportHandlers();
|
|
|
|
});
|
2012-04-29 21:26:14 +00:00
|
|
|
</script>
|