mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
If user selected an entry to link to, but didn't click 'Link' button, link anyway on save.
This commit is contained in:
parent
7a35d59f65
commit
cd3387448a
@ -260,6 +260,15 @@ class etemplate_widget_link extends etemplate_widget
|
|||||||
{
|
{
|
||||||
$value = $value_in =& self::get_array($content, $form_name);
|
$value = $value_in =& self::get_array($content, $form_name);
|
||||||
|
|
||||||
|
// Automatically do link if user selected entry but didn't click 'Link' button
|
||||||
|
$link = self::get_array($content, self::form_name($cname, $this->id . '_link_entry'));
|
||||||
|
if($this->type =='link-to' && is_array($link) && $link['app'] && $link['id'] &&
|
||||||
|
is_array($value) && $value['to_id']
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$result = egw_link::link($value['to_app'], $value['to_id'], $link['app'], $link['id']);
|
||||||
|
}
|
||||||
|
|
||||||
// Look for files
|
// Look for files
|
||||||
$files = self::get_array($content, self::form_name($cname, $this->id . '_file'));
|
$files = self::get_array($content, self::form_name($cname, $this->id . '_file'));
|
||||||
if(is_array($files) && !(is_array($value) && $value['to_id']))
|
if(is_array($files) && !(is_array($value) && $value['to_id']))
|
||||||
|
Loading…
Reference in New Issue
Block a user