$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);
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,