Merge pull request #13028 from MrPetovan/bug/13026-message_recipient.tpl

Separate JSON output of contact lists in message_recipient template
This commit is contained in:
Michael Vogel 2023-04-23 23:05:06 +02:00 committed by GitHub
commit 7295b2c40c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -66,8 +66,9 @@ class ACL
$tpl = Renderer::getMarkupTemplate('acl/message_recipient.tpl');
$o = Renderer::replaceMacros($tpl, [
'$contacts' => json_encode($contacts),
'$selected' => $selected,
'$contacts' => $contacts,
'$contacts_json' => json_encode($contacts),
'$selected' => $selected,
]);
Hook::callAll(DI::args()->getModuleName() . '_post_recipient', $o);

View File

@ -9,7 +9,7 @@
let $recipient_input = $('[name="recipient"]');
let acl = new Bloodhound({
local: {{$contacts nofilter}},
local: {{$contacts_json nofilter}},
identify: function(obj) { return obj.id.toString(); },
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name', 'addr']),
queryTokenizer: Bloodhound.tokenizers.whitespace,