);
$recipientListing->setMultiple(TRUE);
- //token input url
- $tokenUrl = CRM_Utils_System::url('civicrm/ajax/checkemail',
- 'noemail=1',
- FALSE, NULL, FALSE
- );
- $this->assign('tokenUrl', $tokenUrl);
- $this->add('text', 'recipient_manual_id', ts('Manual Recipients'));
+ $this->addEntityRef('recipient_manual_id', ts('Manual Recipients'), array('multiple' => true));
$this->add('select', 'group_id', ts('Group'),
CRM_Core_PseudoConstant::staticGroup(), FALSE, array('class' => 'crm-select2 huge')
{ts 1=$reminderName}WARNING: You are about to delete the Reminder titled <strong>%1</strong>.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
- {* added onload javascript for source contact*}
- {literal}
- <script type="text/javascript">
- var recipient_manual = '';
- var recipient_manual_id = null;
- var toDataUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' q='id=1&noemail=1' h=0 }{literal}"; {/literal}
-
- {if $recipients}
- {foreach from=$recipients key=id item=name}
- {literal} recipient_manual += '{"name":"'+{/literal}"{$name}"{literal}+'","id":"'+{/literal}"{$id}"{literal}+'"},';{/literal}
- {/foreach}
- {literal} eval( 'recipient_manual = [' + recipient_manual + ']'); {/literal}
- {/if}
-
- {literal}
- if ( recipient_manual_id ) {
- eval( 'recipient_manual = ' + recipient_manual_id );
- }
-
- cj(document).ready( function( ) {
- {/literal}
- {literal}
-
- eval( 'tokenClass = { tokenList: "token-input-list-facebook", token: "token-input-token-facebook", tokenDelete: "token-input-delete-token-facebook", selectedToken: "token-input-selected-token-facebook", highlightedToken: "token-input-highlighted-token-facebook", dropdown: "token-input-dropdown-facebook", dropdownItem: "token-input-dropdown-item-facebook", dropdownItem2: "token-input-dropdown-item2-facebook", selectedDropdownItem: "token-input-selected-dropdown-item-facebook", inputToken: "token-input-input-token-facebook" } ');
-
- var tokenDataUrl = "{/literal}{$tokenUrl}{literal}";
- var hintText = "{/literal}{ts escape='js'}Type in a partial or complete name of an existing recipient.{/ts}{literal}";
- cj( "#recipient_manual_id").tokenInput( tokenDataUrl, { prePopulate: recipient_manual, classes: tokenClass, hintText: hintText });
- cj( 'ul.token-input-list-facebook, div.token-input-dropdown-facebook' ).css( 'width', '450px' );
- </script>
- {/literal}
<table class="form-layout-compressed">
<tr class="crm-scheduleReminder-form-block-title">
<td class="right">{$form.title.label}</td><td colspan="3">{$form.title.html}</td>
</tr>
<tr id="recipientManual" class="crm-scheduleReminder-form-block-recipient_manual_id">
<td class="label">{$form.recipient_manual_id.label}</td>
- <td>{$form.recipient_manual_id.html}{edit}<span class="description">{ts}You can manually send out the reminders to these recipients.{/ts}</span>{/edit}</td>
+ <td>{$form.recipient_manual_id.html}{edit}<div class="description">{ts}You can manually send out the reminders to these recipients.{/ts}</div>{/edit}</td>
</tr>
<tr id="recipientGroup" class="crm-scheduleReminder-form-block-recipient_group_id">
<td class="label">{$form.group_id.label}</td>