From 91374bd4d18304b0d541dc7e4d37c60fbdd0f9c6 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 31 Aug 2023 12:26:07 +1200 Subject: [PATCH] Add weight to batch links --- CRM/Financial/Form/BatchTransaction.php | 4 +++- CRM/Financial/Page/AJAX.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index e93585cb56..dee4265809 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -74,7 +74,7 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form_Search { * Build the form object. */ public function buildQuickForm() { - if ($this->_batchStatus == 'Closed') { + if ($this->_batchStatus === 'Closed') { $this->add('xbutton', 'export_batch', ts('Export Batch'), ['type' => 'submit']); } @@ -166,12 +166,14 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form_Search { 'url' => 'civicrm/contact/view/contribution', 'qs' => 'reset=1&id=%%contid%%&cid=%%cid%%&action=view&context=contribution&selectedChild=contribute', 'title' => ts('View Contribution'), + 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::VIEW), ], 'assign' => [ 'name' => ts('Assign'), 'ref' => 'disable-action', 'title' => ts('Assign Transaction'), 'extra' => 'onclick = "assignRemove( %%id%%,\'' . 'assign' . '\' );"', + 'weight' => 50, ], ]; } diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index 7bab72bbd2..9dc74798b3 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -341,12 +341,12 @@ class CRM_Financial_Page_AJAX { while ($financialItem->fetch()) { $row[$financialItem->id] = []; foreach ($columnHeader as $columnKey => $columnValue) { - if ($financialItem->contact_sub_type && $columnKey == 'contact_type') { + if ($financialItem->contact_sub_type && $columnKey === 'contact_type') { $row[$financialItem->id][$columnKey] = $financialItem->contact_sub_type; continue; } $row[$financialItem->id][$columnKey] = $financialItem->$columnKey; - if ($columnKey == 'sort_name' && $financialItem->$columnKey && $financialItem->contact_id) { + if ($columnKey === 'sort_name' && $financialItem->$columnKey && $financialItem->contact_id) { $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=" . $financialItem->contact_id); $row[$financialItem->id][$columnKey] = '' . $financialItem->$columnKey . ''; } -- 2.25.1