summaryrefslogtreecommitdiffstats
path: root/apps/contacts/templates/part.importaddressbook.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/templates/part.importaddressbook.php')
-rw-r--r--apps/contacts/templates/part.importaddressbook.php32
1 files changed, 19 insertions, 13 deletions
diff --git a/apps/contacts/templates/part.importaddressbook.php b/apps/contacts/templates/part.importaddressbook.php
index a055dd60356..6702262f231 100644
--- a/apps/contacts/templates/part.importaddressbook.php
+++ b/apps/contacts/templates/part.importaddressbook.php
@@ -6,28 +6,34 @@
* See the COPYING-README file.
*/
?>
-<td id="importaddressbook_dialog" title="<?php echo $l->t("Import Addressbook"); ?>" colspan="6">
+<td id="importaddressbook_dialog" colspan="6">
+<?php
+if(OCP\App::isEnabled('files_encryption')) {
+ echo '<strong>'.$l->t('Currently this import function doesn\'t work while encryption is enabled.<br />Please upload your VCF file with the file manager and click on it to import.').'</strong>';
+} else { ?>
<table>
<tr>
<th><?php echo $l->t('Select address book to import to:') ?></th>
<td>
- <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>
- <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>
+ <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">
+ <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>
+ <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'); ?>">
+ <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>
</td>
</tr>
</table>
-<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">
-<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>
+<?php } ?>
</td>
<script type="text/javascript">
Contacts.UI.Addressbooks.loadImportHandlers();