*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * class to represent the actions that can be performed on a group of contacts
- * used by the search forms
+ * Class to represent the actions that can be performed on a group of contacts.
*
+ * Used by the search forms.
*/
class CRM_Contribute_Task {
const DELETE_CONTRIBUTIONS = 1, PRINT_CONTRIBUTIONS = 2, EXPORT_CONTRIBUTIONS = 3, BATCH_CONTRIBUTIONS = 4, EMAIL_CONTACTS = 5, UPDATE_STATUS = 6, PDF_RECEIPT = 7;
if (!(self::$_tasks)) {
self::$_tasks = array(
1 => array(
- 'title' => ts('Delete Contributions'),
+ 'title' => ts('Delete contributions'),
'class' => 'CRM_Contribute_Form_Task_Delete',
'result' => FALSE,
),
2 => array(
- 'title' => ts('Print Selected Rows'),
+ 'title' => ts('Print selected rows'),
'class' => 'CRM_Contribute_Form_Task_Print',
'result' => FALSE,
),
3 => array(
- 'title' => ts('Export Contributions'),
+ 'title' => ts('Export contributions'),
'class' => array(
'CRM_Export_Form_Select',
'CRM_Export_Form_Map',
'result' => FALSE,
),
4 => array(
- 'title' => ts('Batch Update Contributions Via Profile'),
+ 'title' => ts('Update multiple contributions'),
'class' => array(
'CRM_Contribute_Form_Task_PickProfile',
'CRM_Contribute_Form_Task_Batch',
'result' => TRUE,
),
5 => array(
- 'title' => ts('Send Email to Contacts'),
+ 'title' => ts('Email - send now'),
'class' => 'CRM_Contribute_Form_Task_Email',
'result' => TRUE,
),
6 => array(
- 'title' => ts('Update Pending Contribution Status'),
+ 'title' => ts('Update pending contribution status'),
'class' => 'CRM_Contribute_Form_Task_Status',
'result' => TRUE,
),
7 => array(
- 'title' => ts('Print or Email Contribution Receipts'),
+ 'title' => ts('Receipts - print or email'),
'class' => 'CRM_Contribute_Form_Task_PDF',
'result' => FALSE,
),
8 => array(
- 'title' => ts('Thank-you Letters for Contributions'),
+ 'title' => ts('Thank-you letters - print or email'),
'class' => 'CRM_Contribute_Form_Task_PDFLetter',
'result' => FALSE,
),
9 => array(
- 'title' => ts('Print or Email Contribution Invoices'),
+ 'title' => ts('Invoices - print or email'),
'class' => 'CRM_Contribute_Form_Task_Invoice',
'result' => FALSE,
),
unset(self::$_tasks[4], self::$_tasks[6]);
}
- // remove action "Print or Email Contribution Invoices"
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ // remove action "Invoices - print or email"
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if (!$invoicing) {
unset(self::$_tasks[9]);