Skip to content

Commit

Permalink
Merge pull request #25033 from kurund/contribution-fee-fixes
Browse files Browse the repository at this point in the history
fixes dash line appended to the contribution amounts if label is empty
  • Loading branch information
demeritcowboy authored Nov 25, 2022
2 parents 5f91da4 + 5f10597 commit 879e495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Price/BAO/PriceField.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public static function addQuickFormElement(

foreach ($customOption as $opId => $opt) {
$preHelpText = $postHelpText = '';
$opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>';
$opt['label'] = !empty($opt['label']) ? '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' : '';
if (!empty($opt['help_pre'])) {
$preHelpText = '<span class="crm-price-amount-help-pre description">' . $opt['help_pre'] . '</span><span class="crm-price-amount-help-pre-separator">:&nbsp;</span>';
}
Expand Down Expand Up @@ -567,7 +567,7 @@ public static function addQuickFormElement(
$max_value = CRM_Utils_Array::value('max_value', $opt, '');

$preHelpText = $postHelpText = '';
$opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>';
$opt['label'] = !empty($opt['label']) ? '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' : '';
if (!empty($opt['help_pre'])) {
$preHelpText = '<span class="crm-price-amount-help-pre description">' . $opt['help_pre'] . '</span><span class="crm-price-amount-help-pre-separator">:&nbsp;</span>';
}
Expand Down

0 comments on commit 879e495

Please sign in to comment.