$this->add('select', 'end_action', ts('Repetition Condition'), $condition, TRUE);
$this->add('select', 'end_date', ts('Date Field'), $sel4, TRUE);
+ $this->add('text', 'from_name', ts('From Name'));
+ $this->add('text', 'from_email', ts('From Email'));
+
$recipient = 'activity_contacts';
$recipientListingOptions = array();
'record_activity',
'limit_to',
'mode',
- 'sms_provider_id'
+ 'sms_provider_id',
+ 'from_name',
+ 'from_email',
);
foreach ($keys as $key) {
$params[$key] = CRM_Utils_Array::value($key, $values);
while ($actionSchedule->fetch()) {
$extraSelect = $extraJoin = $extraWhere = $extraOn = '';
+ if ($actionSchedule->from_email)
+ $fromEmailAddress = "$actionSchedule->from_name <$actionSchedule->from_email>";
+
+
if ($actionSchedule->record_activity) {
if ($mapping->entity == 'civicrm_membership') {
$activityTypeID =
{* file to handle db changes in 4.5.beta1 during upgrade *}
+-- CRM-14807
+ALTER TABLE `civicrm_action_schedule`
+ ADD COLUMN `from_name` varchar(255) AFTER `absolute_date`;
+ALTER TABLE `civicrm_action_schedule`
+ ADD COLUMN `from_email` varchar(255) AFTER `from_name`;
</table>
</td>
</tr>
+ <tr>
+ <td class="label" width="20%">{$form.from_name.label}</td>
+ <td>{$form.from_name.html} {help id="id-from_name_email"}</td>
+ </tr>
+ <tr>
+ <td class="label" width="20%">{$form.from_email.label}</td>
+ <td>{$form.from_email.html} </td>
+ </tr>
<tr class="crm-scheduleReminder-form-block-recipient">
<td id="recipientLabel" class="right">{$form.recipient.label}</td><td colspan="3">{$form.limit_to.html} {$form.recipient.html} {help id="recipient" title=$form.recipient.label}</td>
</tr>
{htxt id="recipient"}
{ts}Only send reminders to participants with the status(es) selected above AND who match this criteria. If you select Manual Recipients - only those people will receive the reminder (AND only if they are ALSO participants with the selected status).{/ts}
{/htxt}
+
+{htxt id="id-from_name_email-title"}
+ {ts}Specify FROM Name and Email{/ts}
+{/htxt}
+
+{htxt id="id-from_name_email"}
+ {ts}You can set the FROM name and email address for this reminder in these fields. If you leave these fields blank, the default FROM name and email address for your site will be used (Administer > Communications > FROM Email Addresses).{/ts}
+{/htxt}
<comment>Date on which the reminder be sent.</comment>
<add>4.1</add>
</field>
+ <field>
+ <name>from_name</name>
+ <type>varchar</type>
+ <length>255</length>
+ <comment>Name in "from" field</comment>
+ <add>4.5</add>
+ </field>
+ <field>
+ <name>from_email</name>
+ <type>varchar</type>
+ <length>255</length>
+ <comment>Email address in "from" field</comment>
+ <add>4.5</add>
+ </field>
<field>
<name>mode</name>
<title>Message Mode</title>