CRM-18459 - Case activity emails not sent to any added Case Resources
authorEllen Hendricks <ellen.hendricks@sprydigital.com>
Thu, 21 Apr 2016 18:17:12 +0000 (13:17 -0500)
committerEllen Hendricks <ellen.hendricks@sprydigital.com>
Thu, 21 Apr 2016 18:17:12 +0000 (13:17 -0500)
Correct the php and template files so the checkboxes are indexed correctly.

----------------------------------------
* CRM-18459: Case activity emails not sent to any added Case Resources
  https://issues.civicrm.org/jira/browse/CRM-18459

CRM/Case/Form/Activity.php
templates/CRM/Case/Form/Activity.tpl

index 4aef5c027002087ac829302e4e78cdc513edd2a5..9147cfb02cc31cd4f337339c1a7f658772b07010 100644 (file)
@@ -307,7 +307,9 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
     if (!empty($this->_relatedContacts)) {
       $checkBoxes = array();
       foreach ($this->_relatedContacts as $id => $row) {
-        $checkBoxes[$id] = $this->addElement('checkbox', $id, NULL, NULL, array('class' => 'select-row'));
+        foreach ($row as $key => $value) {
+          $checkBoxes[$key] = $this->addElement('checkbox', $key, NULL, NULL, array('class' => 'select-row'));
+        }
       }
 
       $this->addGroup($checkBoxes, 'contact_check');
index 1f1baa6c8bc1e48b339916c46f11979e662ff38c..6d3669eee228d37fe46e3ccae9c526e3aa78c225 100644 (file)
                   {foreach from=$searchRows item=row key=id}
                     {foreach from=$searchRows.$id item=row1 key=id1}
                       <tr class="{cycle values="odd-row,even-row"}">
-                        <td class="crm-case-activity-form-block-contact_{$id}">{$form.contact_check[$id].html}</td>
+                        <td class="crm-case-activity-form-block-contact_{$id1}">{$form.contact_check[$id1].html}</td>
                         <td class="crm-case-activity-form-block-role">{$row1.role}</td>
                         <td class="crm-case-activity-form-block-display_name">{$row1.display_name}</td>
                         <td class="crm-case-activity-form-block-email">{$row1.email}</td>