From 8cbff8efbddc54afe68bf4459eb84782cd43a82e Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 12 Oct 2023 10:05:17 +1300 Subject: [PATCH] Add weights to premium screen --- CRM/Contribute/Page/ManagePremiums.php | 7 ++++++- templates/CRM/Contribute/Form/ManagePremiums.tpl | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CRM/Contribute/Page/ManagePremiums.php b/CRM/Contribute/Page/ManagePremiums.php index f1b2b7c86ae6..0c08a37687d2 100644 --- a/CRM/Contribute/Page/ManagePremiums.php +++ b/CRM/Contribute/Page/ManagePremiums.php @@ -53,28 +53,33 @@ public function &links() { 'url' => 'civicrm/admin/contribute/managePremiums', 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Edit Premium'), + 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE), ], CRM_Core_Action::PREVIEW => [ 'name' => ts('Preview'), 'url' => 'civicrm/admin/contribute/managePremiums', 'qs' => 'action=preview&id=%%id%%', 'title' => ts('Preview Premium'), + 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::PREVIEW), ], CRM_Core_Action::DISABLE => [ 'name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable Premium'), + 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DISABLE), ], CRM_Core_Action::ENABLE => [ 'name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable Premium'), + 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ENABLE), ], CRM_Core_Action::DELETE => [ 'name' => ts('Delete'), 'url' => 'civicrm/admin/contribute/managePremiums', 'qs' => 'action=delete&id=%%id%%', 'title' => ts('Delete Premium'), + 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE), ], ]; } @@ -125,7 +130,7 @@ public function browse() { $action -= CRM_Core_Action::DISABLE; } - $premiums[$dao->id]['action'] = CRM_Core_Action::formLink(self::links(), + $premiums[$dao->id]['action'] = CRM_Core_Action::formLink($this->links(), $action, ['id' => $dao->id], ts('more'), diff --git a/templates/CRM/Contribute/Form/ManagePremiums.tpl b/templates/CRM/Contribute/Form/ManagePremiums.tpl index b32fd20a7a30..610fba0b40f3 100644 --- a/templates/CRM/Contribute/Form/ManagePremiums.tpl +++ b/templates/CRM/Contribute/Form/ManagePremiums.tpl @@ -73,12 +73,12 @@ {ts}The market value of this premium (e.g. retail price). For tax-deductible contributions, this amount will be used to set the non-deductible amount in the contribution record and receipt.{/ts} - - {$form.cost.label} - {$form.cost.html}
- {ts}You may optionally record the actual cost of this premium to your organization. This may be useful when evaluating net return for this incentive.{/ts} - - + + {$form.cost.label} + {$form.cost.html}
+ {ts}You may optionally record the actual cost of this premium to your organization. This may be useful when evaluating net return for this incentive.{/ts} + + {$form.financial_type_id.label}