mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Api: Fix adding links did not always work after triggering a form reload
This commit is contained in:
parent
780f16702f
commit
c5e4af397a
@ -330,7 +330,7 @@ export class Et2LinkTo extends Et2InputWidget(ScopedElementsMixin(FormControlMix
|
||||
}
|
||||
else
|
||||
{
|
||||
this.validators.push(new ManualMessage(success));
|
||||
this.validators.push(new ManualMessage(this.egw().lang("failed")));
|
||||
}
|
||||
this.dispatchEvent(new CustomEvent('link.et2_link_to', {bubbles: true, detail: success}));
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ class Link extends Etemplate\Widget
|
||||
|
||||
// Look for files - normally handled by ajax
|
||||
$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) && count($files) > 0 && !(is_array($value) && $value['to_id']))
|
||||
{
|
||||
$value = array();
|
||||
if (is_dir($GLOBALS['egw_info']['server']['temp_dir']) && is_writable($GLOBALS['egw_info']['server']['temp_dir']))
|
||||
|
Loading…
Reference in New Issue
Block a user