From 92f4a0b1dcd5240cb0243390e7d424e88860ee3e Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 2 Apr 2014 17:33:42 -0400 Subject: [PATCH] CRM-13966 - Refactor ScheduleReminders tokeninput to select2 --- CRM/Admin/Form/ScheduleReminders.php | 17 ++-------- .../CRM/Admin/Form/ScheduleReminders.tpl | 34 +------------------ 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index eb66eb1b8f..1c5cbb67d2 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -212,13 +212,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { $recipientListing->setMultiple(TRUE); $this->add('hidden', 'is_recipient_listing', empty($recipientListingOptions) ? FALSE : TRUE, array('id' => 'is_recipient_listing')); - //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, 'create' => TRUE)); $this->addElement( 'select', @@ -313,14 +307,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { } elseif (!empty($defaults['recipient_manual'])) { $defaults['recipient'] = 'manual'; - $recipients = array(); - foreach (explode(',', $defaults['recipient_manual']) as $cid) { - $recipients[$cid] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', - $cid, - 'sort_name' - ); - } - $this->assign('recipients', $recipients); + $defaults['recipient_manual_id'] = $defaults['recipient_manual']; } } diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index 64a6405cfa..16fa99a19f 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -34,38 +34,6 @@ {ts 1=$reminderName}WARNING: You are about to delete the Reminder titled %1.{/ts} {ts}Do you want to continue?{/ts} {else} - {* added onload javascript for source contact*} - {literal} - - {/literal} @@ -111,7 +79,7 @@ - + -- 2.25.1
{$form.title.label}{$form.title.html}
{$form.recipient_manual_id.label}{$form.recipient_manual_id.html}{edit}{ts}You can manually send out the reminders to these recipients.{/ts}{/edit}{$form.recipient_manual_id.html}{edit}
{ts}You can manually send out the reminders to these recipients.{/ts}
{/edit}