Skip to content

Commit

Permalink
Merge pull request civicrm#27710 from totten/5.66-links-weights
Browse files Browse the repository at this point in the history
hook_civicrm_links - Add more weights
  • Loading branch information
eileenmcnaughton authored Oct 3, 2023
2 parents 1521bb6 + 36d6ab7 commit 95b5e8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ protected static function getContributionTransactionInformation($contributionId,
'class' => 'medium-popup',
'qs' => "reset=1&id=%%id%%&contribution_id=%%contribution_id%%",
'title' => ts('Edit Payment'),
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE),
],
];
$paymentEditLink = CRM_Core_Action::formLink(
Expand Down Expand Up @@ -4308,6 +4309,7 @@ public static function getContributionPaymentLinks(int $id, string $contribution
'is_refund' => 0,
],
'extra' => '',
'weight' => 0,
];

if (CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()) {
Expand All @@ -4325,6 +4327,7 @@ public static function getContributionPaymentLinks(int $id, string $contribution
'mode' => 'live',
],
'extra' => '',
'weight' => 0,
];
}
if ($contributionStatus !== 'Pending') {
Expand All @@ -4341,6 +4344,7 @@ public static function getContributionPaymentLinks(int $id, string $contribution
'is_refund' => 1,
],
'extra' => '',
'weight' => 0,
];
}

Expand Down
1 change: 1 addition & 0 deletions CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ public static function buildCustomFieldData($dao, &$groupTree, $table, $groupID,
'qs' => 'reset=1&id=%%id%%&eid=%%eid%%&fid=%%fid%%&action=delete&fcs=%%fcs%%',
'extra' => 'onclick = "if (confirm( \'' . $deleteExtra
. '\' ) ) this.href+=\'&confirmed=1\'; else return false;"',
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
],
];
$customValue['deleteURL'] = CRM_Core_Action::formLink($deleteURL,
Expand Down
2 changes: 2 additions & 0 deletions CRM/Financial/Page/BatchTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ public function &links() {
'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),
],
'remove' => [
'name' => ts('Remove'),
'title' => ts('Remove Transaction'),
'extra' => 'onclick = "removeFromBatch(%%id%%);"',
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
],
];
}
Expand Down

0 comments on commit 95b5e8a

Please sign in to comment.