mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 21:13:16 +01:00
* InfoLog: fixed not able to remove already selected project
This commit is contained in:
parent
564f958fbb
commit
1c1dea3d5e
@ -1697,14 +1697,24 @@ class infolog_ui
|
||||
}
|
||||
$content['info_link_id'] = (int)($info_link_id = egw_link::link('infolog',$content['link_to']['to_id'],$app,$id));
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($content['info_link_id']);
|
||||
}
|
||||
if ($old_link_id && $old_link_id != $content['info_link_id'])
|
||||
{
|
||||
$link = egw_link::get_link($old_link_id);
|
||||
// Keep projectmanager link if it's the same project as before
|
||||
if(!($link['link_app2'] == 'projectmanager' && $link['link_id2'] == $content['old_pm_id']))
|
||||
// remove selected project, if removed link is that project
|
||||
if($link['link_app2'] == 'projectmanager' && $link['link_id2'] == $content['old_pm_id'])
|
||||
{
|
||||
egw_link::unlink($old_link_id);
|
||||
unset($content['pm_id'], $content['old_pm_id']);
|
||||
}
|
||||
egw_link::unlink($old_link_id);
|
||||
}
|
||||
// if added link is a project and no other project selected, also add as project
|
||||
if ($app == 'projectmanager' && $id && !$content['pm_id'])
|
||||
{
|
||||
$content['old_pm_id'] = $content['pm_id'] = $id;
|
||||
}
|
||||
}
|
||||
if (is_array($content['link_to']['to_id']) && count($content['link_to']['to_id']))
|
||||
|
@ -41,7 +41,7 @@
|
||||
</row>
|
||||
<row class="row">
|
||||
<description value="Project"/>
|
||||
<link-entry id="pm_id" onchange="1" only_app='projectmanager' blur='None' class="infolog_projectName"/>
|
||||
<link-entry id="pm_id" only_app='projectmanager' blur='None' class="infolog_projectName"/>
|
||||
</row>
|
||||
<row class="row">
|
||||
<description value="Price"/>
|
||||
|
Loading…
Reference in New Issue
Block a user