* Addressbook: Fix upload photo does not work for limited access of own data

This commit is contained in:
Hadi Nategh 2016-09-29 16:17:45 +02:00
parent 7bea74a3af
commit 83152bcb29
2 changed files with 10 additions and 2 deletions

View File

@ -2290,6 +2290,14 @@ window.egw_LAB.wait(function() {
{
$readonlys[$field] = false;
}
if (!$readonlys['jpegphoto'])
{
$readonlys = array_merge($readonlys, array(
'upload_photo' => false,
'delete_photo' => false,
'addressbook.edit.upload' => false
));
}
}
if (isset($readonlys['n_fileas'])) $readonlys['fileas_type'] = $readonlys['n_fileas'];
// disable not needed tabs

View File

@ -2,7 +2,7 @@
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="addressbook.edit.upload" template="" lang="" group="0" version="1.3.004">
<template id="addressbook.edit.upload" template="" lang="" group="0" version="1.3.004" >
<grid class="uploadphoto">
<columns>
<column/>
@ -15,7 +15,7 @@
<file statustext="Select a portrait format jpeg photo. It will be resized to 60 pixel width." id="upload_photo" class="photo"/>
</row>
<row>
<button align="center" label="Ok" onclick="jQuery('table.uploadphoto').css('display','none'); return false;" image="check" background_image="1"/>
<button readonly="false" align="center" label="Ok" onclick="jQuery('table.uploadphoto').css('display','none'); return false;" image="check" background_image="1"/>
</row>
</rows>
</grid>