2012-02-06 10:32:57 +04:00
|
|
|
<?php
|
|
|
|
$id = isset($_['id']) ? $_['id'] : '';
|
|
|
|
?>
|
|
|
|
<div id="card">
|
2012-05-04 17:47:19 +04:00
|
|
|
<form class="float" id="file_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadphoto.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target">
|
2012-06-13 19:35:42 +04:00
|
|
|
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
|
2012-05-04 17:47:19 +04:00
|
|
|
<input type="hidden" name="id" value="<?php echo $_['id'] ?>">
|
|
|
|
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
|
|
|
|
<input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
|
|
|
|
<input id="file_upload_start" type="file" accept="image/*" name="imagefile" />
|
|
|
|
</form>
|
2012-02-06 10:32:57 +04:00
|
|
|
<div id="actionbar">
|
2012-05-04 18:36:45 +04:00
|
|
|
<button class="svg action" id="contacts_downloadcard" title="<?php echo $l->t('Download contact');?>"></button>
|
|
|
|
<button class="svg action" id="contacts_deletecard" title="<?php echo $l->t('Delete contact');?>"></button>
|
2012-02-06 10:32:57 +04:00
|
|
|
</div>
|
|
|
|
|
2012-04-03 05:28:12 +04:00
|
|
|
<div id="contact_photo" class="contactsection">
|
2012-02-06 10:32:57 +04:00
|
|
|
|
2012-05-04 17:47:19 +04:00
|
|
|
<iframe name="file_upload_target" id='file_upload_target' src=""></iframe>
|
|
|
|
<div class="tip propertycontainer" id="contacts_details_photo_wrapper" title="<?php echo $l->t('Drop photo to upload'); ?> (max <?php echo $_['uploadMaxHumanFilesize']; ?>)" data-element="PHOTO">
|
|
|
|
</div>
|
2012-04-07 18:03:11 +04:00
|
|
|
</div> <!-- contact_photo -->
|
2012-04-03 05:28:12 +04:00
|
|
|
|
|
|
|
<div id="contact_identity" class="contactsection">
|
|
|
|
<form method="post">
|
2012-02-06 10:32:57 +04:00
|
|
|
<input type="hidden" name="id" value="<?php echo $_['id'] ?>">
|
2012-06-13 19:35:42 +04:00
|
|
|
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
|
2012-04-03 05:28:12 +04:00
|
|
|
<fieldset id="ident" class="contactpart">
|
|
|
|
<span class="propertycontainer" data-element="N"><input type="hidden" id="n" class="contacts_property" name="value" value="" /></span>
|
|
|
|
<span id="name" class="propertycontainer" data-element="FN">
|
2012-05-02 14:10:44 +04:00
|
|
|
<select class="float" id="fn_select" title="<?php echo $l->t('Format custom, Short name, Full name, Reverse or Reverse with comma'); ?>">
|
|
|
|
</select><a role="button" id="edit_name" class="action edit" title="<?php echo $l->t('Edit name details'); ?>"></a>
|
2012-04-03 05:28:12 +04:00
|
|
|
</span>
|
|
|
|
<dl id="identityprops" class="form">
|
2012-05-02 14:10:44 +04:00
|
|
|
<dt class="hidden" id="org_label" data-element="ORG"><label for="org"><?php echo $l->t('Organization'); ?></label></dt>
|
|
|
|
<dd class="propertycontainer hidden" id="org_value" data-element="ORG"><input id="org" required="required" name="value[ORG]" type="text" class="contacts_property big" name="value" value="" placeholder="<?php echo $l->t('Organization'); ?>" /><a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a></dd>
|
|
|
|
<dt class="hidden" id="nickname_label" data-element="NICKNAME"><label for="nickname"><?php echo $l->t('Nickname'); ?></label></dt>
|
|
|
|
<dd class="propertycontainer hidden" id="nickname_value" data-element="NICKNAME"><input id="nickname" required="required" name="value[NICKNAME]" type="text" class="contacts_property big" name="value" value="" placeholder="<?php echo $l->t('Enter nickname'); ?>" /><a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a></dd>
|
2012-06-11 04:40:26 +04:00
|
|
|
<dt class="hidden" id="url_label" data-element="URL"><label for="url"><?php echo $l->t('Web site'); ?></label></dt>
|
2012-06-06 17:28:39 +04:00
|
|
|
<dd class="propertycontainer hidden" id="url_value" data-element="URL"><input id="url" required="required" name="value[URL]" type="text" class="contacts_property big" name="value" value="" placeholder="<?php echo $l->t('http://www.somesite.com'); ?>" /><a role="button" class="action globe" title="<?php echo $l->t('Go to web site'); ?>"><a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a></dd>
|
2012-05-02 14:10:44 +04:00
|
|
|
<dt class="hidden" id="bday_label" data-element="BDAY"><label for="bday"><?php echo $l->t('Birthday'); ?></label></dt>
|
|
|
|
<dd class="propertycontainer hidden" id="bday_value" data-element="BDAY"><input id="bday" required="required" name="value" type="text" class="contacts_property big" value="" placeholder="<?php echo $l->t('dd-mm-yyyy'); ?>" /><a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a></dd>
|
|
|
|
<dt class="hidden" id="categories_label" data-element="CATEGORIES"><label for="categories"><?php echo $l->t('Groups'); ?></label></dt>
|
|
|
|
<dd class="propertycontainer hidden" id="categories_value" data-element="CATEGORIES"><input id="categories" required="required" name="value[CATEGORIES]" type="text" class="contacts_property bold" name="value" value="" placeholder="
|
|
|
|
<?php echo $l->t('Separate groups with commas'); ?>" />
|
|
|
|
<a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a><a role="button" class="action edit" title="<?php echo $l->t('Edit groups'); ?>"></a></dd>
|
2012-02-06 10:32:57 +04:00
|
|
|
</dl>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
2012-04-07 18:03:11 +04:00
|
|
|
</div> <!-- contact_identity -->
|
2012-02-06 10:32:57 +04:00
|
|
|
|
|
|
|
<!-- div class="delimiter"></div -->
|
2012-04-03 05:28:12 +04:00
|
|
|
<div id="contact_communication" class="contactsection">
|
|
|
|
<form method="post">
|
2012-02-06 10:32:57 +04:00
|
|
|
<!-- email addresses -->
|
2012-04-03 05:28:12 +04:00
|
|
|
<div id="emails">
|
2012-02-06 10:32:57 +04:00
|
|
|
<ul id="emaillist" class="propertylist">
|
2012-05-02 14:10:44 +04:00
|
|
|
<li class="template hidden" data-element="EMAIL">
|
2012-04-07 18:03:11 +04:00
|
|
|
<input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
|
2012-05-02 14:10:44 +04:00
|
|
|
<input type="email" required="required" class="nonempty contacts_property" name="value" value="" x-moz-errormessage="<?php echo $l->t('Please specify a valid email address.'); ?>" placeholder="<?php echo $l->t('Enter email address'); ?>" />
|
2012-04-30 00:10:16 +04:00
|
|
|
<select class="hidden" multiple="multiple" name="parameters[TYPE][]">
|
2012-05-07 01:00:36 +04:00
|
|
|
<?php echo OCP\html_select_options($_['email_types'], array()) ?>
|
2012-04-30 00:10:16 +04:00
|
|
|
</select>
|
2012-05-02 14:10:44 +04:00
|
|
|
<span class="listactions"><a class="action mail" title="<?php echo $l->t('Mail to address'); ?>"></a>
|
|
|
|
<a role="button" class="action delete" title="<?php echo $l->t('Delete email address'); ?>"></a></span></li>
|
|
|
|
</ul>
|
2012-02-06 10:32:57 +04:00
|
|
|
</div> <!-- email addresses-->
|
|
|
|
|
|
|
|
<!-- Phone numbers -->
|
2012-04-03 05:28:12 +04:00
|
|
|
<div id="phones">
|
2012-02-06 10:32:57 +04:00
|
|
|
<ul id="phonelist" class="propertylist">
|
2012-05-02 14:10:44 +04:00
|
|
|
<li class="template hidden" data-element="TEL">
|
2012-04-07 18:03:11 +04:00
|
|
|
<input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
|
2012-05-02 14:10:44 +04:00
|
|
|
<input type="text" required="required" class="nonempty contacts_property" name="value" value="" placeholder="<?php echo $l->t('Enter phone number'); ?>" />
|
2012-02-06 10:32:57 +04:00
|
|
|
<select multiple="multiple" name="parameters[TYPE][]">
|
2012-05-07 01:00:36 +04:00
|
|
|
<?php echo OCP\html_select_options($_['phone_types'], array()) ?>
|
2012-02-06 10:32:57 +04:00
|
|
|
</select>
|
2012-05-02 14:10:44 +04:00
|
|
|
<a role="button" class="action delete" title="<?php echo $l->t('Delete phone number'); ?>"></a></li>
|
|
|
|
</ul>
|
2012-02-06 10:32:57 +04:00
|
|
|
</div> <!-- Phone numbers -->
|
|
|
|
|
|
|
|
<!-- Addresses -->
|
2012-05-02 14:10:44 +04:00
|
|
|
<div id="addresses" class="hidden">
|
2012-02-06 10:32:57 +04:00
|
|
|
<div id="addressdisplay">
|
2012-05-02 14:10:44 +04:00
|
|
|
<dl class="addresscard template hidden" data-element="ADR"><dt>
|
2012-02-06 10:32:57 +04:00
|
|
|
<input class="adr contacts_property" name="value" type="hidden" value="" />
|
|
|
|
<input type="hidden" class="adr_type contacts_property" name="parameters[TYPE][]" value="" />
|
2012-05-02 14:10:44 +04:00
|
|
|
<span class="adr_type_label"></span><a class="action globe" title="<?php echo $l->t('View on map'); ?>"></a><a class="action edit" title="<?php echo $l->t('Edit address details'); ?>"></a><a role="button" class="action delete" title="Delete address"></a>
|
2012-02-06 10:32:57 +04:00
|
|
|
</dt><dd><ul class="addresslist"></ul></dd></dl>
|
|
|
|
|
2012-04-07 18:03:11 +04:00
|
|
|
</div> <!-- addressdisplay -->
|
2012-02-06 10:32:57 +04:00
|
|
|
</div> <!-- Addresses -->
|
2012-04-03 05:28:12 +04:00
|
|
|
</form>
|
2012-04-07 18:03:11 +04:00
|
|
|
</div> <!-- contact_communication -->
|
2012-05-04 17:47:19 +04:00
|
|
|
|
2012-04-03 05:28:12 +04:00
|
|
|
<div id="contact_note" class="contactsection">
|
|
|
|
<form class="float" method="post">
|
2012-05-04 17:47:19 +04:00
|
|
|
<div id="note" class="propertycontainer" data-element="NOTE">
|
|
|
|
<textarea class="contacts_property" name="value" required="required" placeholder="<?php echo $l->t('Add notes here.'); ?>" cols="60" wrap="hard"></textarea>
|
|
|
|
</div>
|
2012-02-06 10:32:57 +04:00
|
|
|
</form>
|
2012-04-03 05:28:12 +04:00
|
|
|
</div> <!-- contact_note -->
|
2012-05-04 17:47:19 +04:00
|
|
|
|
2012-05-04 18:36:45 +04:00
|
|
|
<div id="contacts_propertymenu">
|
|
|
|
<button class="button" id="contacts_propertymenu_button"><?php echo $l->t('Add field'); ?></button>
|
|
|
|
<ul id="contacts_propertymenu_dropdown" role="menu" class="hidden">
|
|
|
|
<li><a role="menuitem" data-type="PHOTO"><?php echo $l->t('Profile picture'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="ORG"><?php echo $l->t('Organization'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="NICKNAME"><?php echo $l->t('Nickname'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="BDAY"><?php echo $l->t('Birthday'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="TEL"><?php echo $l->t('Phone'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="EMAIL"><?php echo $l->t('Email'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="ADR"><?php echo $l->t('Address'); ?></a></li>
|
|
|
|
<li><a role="menuitem" data-type="NOTE"><?php echo $l->t('Note'); ?></a></li>
|
2012-06-06 17:28:39 +04:00
|
|
|
<li><a role="menuitem" data-type="URL"><?php echo $l->t('Web site'); ?></a></li>
|
2012-05-04 18:36:45 +04:00
|
|
|
<li><a role="menuitem" data-type="CATEGORIES"><?php echo $l->t('Groups'); ?></a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2012-04-03 05:28:12 +04:00
|
|
|
</div> <!-- card -->
|
2012-02-06 10:32:57 +04:00
|
|
|
<div id="edit_photo_dialog" title="Edit photo">
|
|
|
|
<div id="edit_photo_dialog_img"></div>
|
|
|
|
</div>
|
|
|
|
<script language="Javascript">
|
|
|
|
$(document).ready(function(){
|
|
|
|
if('<?php echo $id; ?>'!='') {
|
|
|
|
$.getJSON(OC.filePath('contacts', 'ajax', 'contactdetails.php'),{'id':'<?php echo $id; ?>'},function(jsondata){
|
|
|
|
if(jsondata.status == 'success'){
|
2012-03-29 17:24:32 +04:00
|
|
|
$('#leftcontent li[data-id="<?php echo $id; ?>"]').addClass('active');
|
2012-02-06 10:32:57 +04:00
|
|
|
Contacts.UI.Card.loadContact(jsondata.data);
|
2012-05-03 13:11:26 +04:00
|
|
|
Contacts.UI.loadHandlers();
|
2012-02-06 10:32:57 +04:00
|
|
|
}
|
|
|
|
else{
|
2012-04-07 18:03:11 +04:00
|
|
|
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
2012-02-06 10:32:57 +04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|