From d43c27a31b9ef0b60e64b93748916030de4aaff1 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 7 Oct 2021 14:51:16 -0600 Subject: [PATCH] Fix nested placeholders (customfields from other apps) were not being displayed properly --- api/js/etemplate/et2_widget_placeholder.ts | 2 +- api/src/Storage/Merge.php | 2 +- infolog/inc/class.infolog_merge.inc.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/et2_widget_placeholder.ts b/api/js/etemplate/et2_widget_placeholder.ts index 9e4578a71f..e82b54b1c1 100644 --- a/api/js/etemplate/et2_widget_placeholder.ts +++ b/api/js/etemplate/et2_widget_placeholder.ts @@ -339,7 +339,7 @@ export class et2_placeholder_select extends et2_inputWidget { continue; } - options[key].push({ + options[this.egw().lang(key)].push({ value: key + '-' + sub, label: this.egw().lang(sub) }); diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index f86a651bb7..f9a201af90 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -3085,7 +3085,7 @@ abstract class Merge $app = self::get_app_class($field['type']); if($app) { - $this->add_linked_placeholders($placeholders, $name, $app->get_placeholder_list('#' . $name)); + $this->add_linked_placeholders($placeholders, $name, $app->get_placeholder_list(($prefix ? $prefix . '/' : '') . '#' . $name)); } } else diff --git a/infolog/inc/class.infolog_merge.inc.php b/infolog/inc/class.infolog_merge.inc.php index 520c3f2299..49e765ea02 100644 --- a/infolog/inc/class.infolog_merge.inc.php +++ b/infolog/inc/class.infolog_merge.inc.php @@ -316,7 +316,7 @@ class infolog_merge extends Api\Storage\Merge [lang($tracking->field2label['info_from']) => []] + array_slice($placeholders, $insert_index, count($placeholders) - $insert_index, true); $contact_merge = new Api\Contacts\Merge(); - $contact = $contact_merge->get_placeholder_list('info_contact'); + $contact = $contact_merge->get_placeholder_list($this->prefix($prefix, 'info_contact')); $this->add_linked_placeholders($placeholders, lang($tracking->field2label['info_from']), $contact); return $placeholders;