mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
correctly disable change_org, if no organisation set
This commit is contained in:
parent
7ff86a46a6
commit
d4c1a288e4
@ -1793,7 +1793,6 @@ class addressbook_ui extends addressbook_bo
|
||||
$GLOBALS['egw']->js->set_onload('show_custom_country(document.getElementById("exec[adr_one_countrycode]"));');
|
||||
$GLOBALS['egw']->js->set_onload('show_custom_country(document.getElementById("exec[adr_two_countrycode]"));');
|
||||
|
||||
$content['disable_change_org'] = $view || !$content['org_name'];
|
||||
//_debug_array($content);
|
||||
$readonlys['button[delete]'] = !$content['owner'] || !$this->check_perms(EGW_ACL_DELETE,$content);
|
||||
$readonlys['button[copy]'] = $readonlys['button[edit]'] = $readonlys['button[vcard]'] = true;
|
||||
@ -1824,6 +1823,7 @@ class addressbook_ui extends addressbook_bo
|
||||
$this->account_repository == 'ldap' && $content['account_id'];
|
||||
$readonlys['button[delete]'] = !$content['id'];
|
||||
if ($this->config['private_cf_tab']) $content['no_private_cfs'] = 0;
|
||||
$readonlys['change_org'] = empty($content['org_name']) || $view;
|
||||
|
||||
// for editing the own account (by a non-admin), enable only the fields allowed via the "own_account_acl"
|
||||
if (!$content['owner'] && !$this->is_admin($content))
|
||||
@ -2202,9 +2202,9 @@ class addressbook_ui extends addressbook_bo
|
||||
// setting hidebuttons for content will hide the 'normal' addressbook edit dialog buttons
|
||||
$content['hidebuttons'] = true;
|
||||
$content['no_tid'] = true;
|
||||
$content['disable_change_org'] = true;
|
||||
|
||||
$this->tmpl->read('addressbook.search');
|
||||
$this->tmpl->set_cell_attribute('change_org','disabled',true);
|
||||
return $this->tmpl->exec('addressbook.addressbook_ui.search',$content,$sel_options,$readonlys,array(
|
||||
'do_email' => $do_email,
|
||||
),2);
|
||||
|
Loading…
Reference in New Issue
Block a user