<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
| Copyright (C) 2011 Marty Wright |
| Licensed to CiviCRM under the Academic Free License version 3.0. |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
$isActive = ts('Send email');
$recordActivity = ts('Record activity for automated email');
if ($providersCount) {
+ $this->assign('sms', $providersCount);
$title = ts('Email or SMS');
$isActive = ts('Send email or SMS');
$recordActivity = ts('Record activity for automated email or SMS');
$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',
}
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'];
}
}