'url' => 'civicrm/contact/view/contribution',
'qs' => 'reset=1&action=update&id=%%id%%&cid=%%cid%%&context=%%cxt%%&mode=live',
'title' => ts('Pay with Credit Card'),
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ADD),
];
}
- elseif (($row['contribution_status_name'] ?? NULL) == 'Pending') {
+ elseif (($row['contribution_status_name'] ?? NULL) === 'Pending') {
$row['contribution_status'] .= ' (' . ts('Incomplete Transaction') . ')';
}
if (in_array($row['contribution_status_name'], ['Partially paid', 'Pending refund']) || $isPayLater) {
$buttonName = ts('Record Payment');
- if ($row['contribution_status_name'] == 'Pending refund') {
+ if ($row['contribution_status_name'] === 'Pending refund') {
$buttonName = ts('Record Refund');
}
elseif (CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()) {
'url' => 'civicrm/payment/add',
'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=contribution&mode=live',
'title' => ts('Submit Credit Card payment'),
+ 'weight' => 30,
];
}
$links[CRM_Core_Action::ADD] = [
'url' => 'civicrm/payment',
'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=contribution',
'title' => $buttonName,
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ADD),
];
}
$links = $links + CRM_Contribute_Task::getContextualLinks($row);
'title' => ts('Delete contributions'),
'class' => 'CRM_Contribute_Form_Task_Delete',
'result' => FALSE,
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
],
self::TASK_PRINT => [
'title' => ts('Print selected rows'),
'class' => 'CRM_Contribute_Form_Task_Print',
'result' => FALSE,
+ 'weight' => 10,
],
self::TASK_EXPORT => [
'title' => ts('Export contributions'),
'CRM_Contribute_Export_Form_Map',
],
'result' => FALSE,
+ 'weight' => 20,
],
self::BATCH_UPDATE => [
'title' => ts('Update multiple contributions'),
'CRM_Contribute_Form_Task_Batch',
],
'result' => TRUE,
+ 'weight' => 30,
],
self::TASK_EMAIL => [
'title' => ts('Email - send now (to %1 or less)', [
]),
'class' => 'CRM_Contribute_Form_Task_Email',
'result' => TRUE,
+ 'weight' => 40,
],
self::UPDATE_STATUS => [
'title' => ts('Record payments for contributions'),
'class' => 'CRM_Contribute_Form_Task_Status',
'result' => TRUE,
+ 'weight' => 50,
],
self::PDF_RECEIPT => [
'title' => ts('Receipts - print or email'),
'icon' => 'fa-envelope-o',
'filters' => ['contribution_status_id' => [CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Completed')]],
'is_single_mode' => TRUE,
+ 'weight' => 60,
],
self::PDF_THANKYOU => [
'title' => ts('Thank-you letters - print or email'),
'name' => ts('Send Letter'),
'is_single_mode' => TRUE,
'title_single_mode' => ts('Thank-you letter - print or email'),
+ 'weight' => 70,
],
self::PDF_INVOICE => [
'title' => ts('Invoices - print or email'),
'class' => 'CRM_Contribute_Form_Task_Invoice',
'result' => FALSE,
+ 'weight' => 80,
],
];