* Addressbook: fix issue of avatar edit is disabled even though user has enough rights to edit it.

This commit is contained in:
Hadi Nategh 2019-10-02 12:53:02 +02:00
parent 7914168502
commit 12eb1e9d24
2 changed files with 2 additions and 2 deletions

View File

@ -3065,7 +3065,7 @@ class addressbook_ui extends addressbook_bo
{
$response = Api\Json\Response::get();
$response->data((!($contact = $this->read($contact_id)) ||
empty($contact['jpegphoto']) && !(($contact['files'] & Api\Contacts::FILES_BIT_PHOTO) &&
empty($contact['photo']) && !(($contact['files'] & Api\Contacts::FILES_BIT_PHOTO) &&
($size = filesize($url=Api\Link::vfs_path('addressbook', $contact_id, Api\Contacts::FILES_PHOTO))))));
}

View File

@ -351,7 +351,7 @@
<row class="dialogHeader">
<box align="center">
<hbox disabled="@hidebuttons" class="avatar">
<avatar contact_id="$cont[id]" src="$cont[photo]" crop="false" editable="true"/>
<avatar id="jpegphoto" contact_id="$cont[id]" src="$cont[photo]" crop="false" editable="true"/>
</hbox>
</box>
<textbox id="n_fn" blur="Name" no_lang="1" tabindex="-1" class="cursorHand et2_fullWidth" onclick="jQuery('table.editname').css('display','inline'); var focElem = document.getElementById(form::name('n_prefix')); if (!(typeof(focElem) == 'undefined') &amp;&amp; typeof(focElem.focus)=='function') document.getElementById(form::name('n_prefix')).focus();" autocomplete="name"/>