Mail: Fix compose + to tracker tried to pass object as value

This commit is contained in:
nathan 2023-02-14 11:46:42 -07:00
parent 7d9c55e4bf
commit 396c537dd7
2 changed files with 5 additions and 6 deletions

View File

@ -3413,7 +3413,7 @@ class mail_compose
foreach(array('to_infolog','to_tracker','to_calendar') as $app_key)
{
$entryid = $_formData['to_integrate_ids'][0][$app_key] ?? null;
list(, $entryid) = explode(":", $_formData['to_integrate_ids'][0]) ?? null;
if ($_formData[$app_key] == 'on')
{
$app_name = substr($app_key,3);

View File

@ -5393,11 +5393,10 @@ app.classes.mail = AppJS.extend(
{
var title = egw.lang('Select') + ' ' + egw.lang(integApps[index]) + ' ' + (egw.link_get_registry(integApps[index], 'entry') ? egw.link_get_registry(integApps[index], 'entry') : egw.lang('entry'));
this.integrate_checkAppEntry(title, integApps[index].substr(3), subject.get_value(), '', mail_import_hook , function (args){
var value = {};
value[integApps[index]] = args.entryid;
var oldValue = to_integrate_ids.get_value()[0];
to_integrate_ids.set_value(jQuery.extend(value,oldValue));
index = index<integApps.length? ++index:false;
var oldValue = to_integrate_ids.get_value() || [];
to_integrate_ids.set_value([integApps[index] + ":" + args.entryid, ...oldValue]);
index = index < integApps.length ? ++index : false;
self.compose_integrate_submit(index);
});
return true;