Skip to content

Commit

Permalink
Merge pull request #27789 from eileenmcnaughton/566_prem
Browse files Browse the repository at this point in the history
Add weights to premium screen
  • Loading branch information
yashodha authored Oct 12, 2023
2 parents 51ce59c + 8cbff8e commit ab46b79
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CRM/Contribute/Page/ManagePremiums.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
],
];
}
Expand Down Expand Up @@ -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'),
Expand Down
12 changes: 6 additions & 6 deletions templates/CRM/Contribute/Form/ManagePremiums.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@
<span class="description">{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}</span>
</td>
</tr>
<tr class="crm-contribution-form-block-cost">
<td class="label">{$form.cost.label}</td>
<td class="html-adjust">{$form.cost.html}<br />
<span class="description">{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}</span>
</td>
</tr>
<tr class="crm-contribution-form-block-cost">
<td class="label">{$form.cost.label}</td>
<td class="html-adjust">{$form.cost.html}<br />
<span class="description">{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}</span>
</td>
</tr>
<tr class="crm-contribution-form-block-financial_type">
<td class="label">{$form.financial_type_id.label}</td>
<td class="html-adjust">
Expand Down

0 comments on commit ab46b79

Please sign in to comment.