if (count($form->_contactIds) > 1) {
$form->_single = FALSE;
}
-
+
$emailAttributes = array(
'class' => 'huge',
);
if (in_array($contactId, $form->_toContactIds)) {
$form->_toContactDetails[$contactId] = $form->_contactDetails[$contactId];
$toArray[] = array(
- 'name' => '"' . $value['sort_name'] . '" <' . $email . '>',
+ 'text' => '"' . $value['sort_name'] . '" <' . $email . '>',
'id' => "$contactId::{$email}",
);
}
elseif (in_array($contactId, $form->_ccContactIds)) {
$ccArray[] = array(
- 'name' => '"' . $value['sort_name'] . '" <' . $email . '>',
+ 'text' => '"' . $value['sort_name'] . '" <' . $email . '>',
'id' => "$contactId::{$email}",
);
}
elseif (in_array($contactId, $form->_bccContactIds)) {
$bccArray[] = array(
- 'name' => '"' . $value['sort_name'] . '" <' . $email . '>',
+ 'text' => '"' . $value['sort_name'] . '" <' . $email . '>',
'id' => "$contactId::{$email}",
);
}
var sourceDataUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' q='id=1' h=0 }{literal}";
- function emailSelect(el){
+ function emailSelect(el, prepopulate){
$(el).data('api-entity', 'contact').crmSelect2({
minimumInputLength: 1,
multiple: true,
};
}
}
- });
+ }).select2('data', prepopulate);
}
- emailSelect('#to');
- emailSelect('#cc_id');
- emailSelect('#bcc_id');
+ emailSelect('#to', toContact);
+ emailSelect('#cc_id', ccContact);
+ emailSelect('#bcc_id', bccContact);
});