'result' => FALSE,
'title_single_mode' => ts('Send Receipt'),
'name' => ts('Send Receipt'),
- 'is_support_standalone' => TRUE,
+ 'url' => 'civicrm/contribute/task?reset=1&task=receipt',
'key' => 'receipt',
+ 'icon' => 'fa-envelope-o',
'filters' => ['contribution_status_id' => [CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Completed')]],
'is_single_mode' => TRUE,
],
}
}
}
- $tasks[$key]['url'] = 'civicrm/contribute/task';
- $tasks[$key]['qs'] = ['reset' => 1, 'id' => $row['contribution_id'], 'task' => $task['key']];
+ $tasks[$key]['url'] = $task['url'];
+ $tasks[$key]['qs'] = ['id' => $row['contribution_id']];
$tasks[$key]['title'] = $task['title_single_mode'] ?? $task['title'];
}
return $tasks;
'icon' => 'fa-file-excel-o',
'crmPopup' => [
'path' => "'civicrm/export/standalone'",
- 'query' => "{entity: '{$entity['name']}', id: ids.join(',')}",
+ 'query' => "{reset: 1, entity: '{$entity['name']}', id: ids.join(',')}",
],
];
}
'icon' => $task['icon'] ?? 'fa-gear',
'crmPopup' => [
'path' => "'{$task['url']}'",
- 'query' => "{cids: ids.join(',')}",
+ 'query' => "{reset: 1, cids: ids.join(',')}",
+ ],
+ ];
+ }
+ }
+ }
+
+ if ($entity['name'] === 'Contribution') {
+ foreach (\CRM_Contribute_Task::tasks() as $id => $task) {
+ if (!empty($task['url'])) {
+ $tasks[] = [
+ 'name' => 'contribution.' . $id,
+ 'title' => $task['title'],
+ 'icon' => $task['icon'] ?? 'fa-gear',
+ 'crmPopup' => [
+ 'path' => "'{$task['url']}'",
+ 'query' => "{id: ids.join(',')}",
],
];
}