$taxAmount = CRM_Utils_Array::value('tax_amount', $opt);
if ($field->is_display_amounts) {
$opt['label'] = !empty($opt['label']) ? $opt['label'] . ' - ' : '';
+ $pre_help = isset($opt['help_pre']) ?
+ '<span class="crm-price-amount-help-pre">' . $opt['help_pre'] . '</span>: ' : '';
+ $post_help = isset($opt['help_post']) ?
+ ': <span class="crm-price-amount-help-post">' . $opt['help_post'] . '</span>' : '';
if (isset($taxAmount) && $invoicing) {
if ($displayOpt == 'Do_not_show') {
- $opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . '</span>';
+ $opt['label'] = $pre_help . '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . '</span>' . $post_help;
}
elseif ($displayOpt == 'Inclusive') {
- $opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . '</span>';
- $opt['label'] .= '<span class="crm-price-amount-tax"> (includes ' . $taxTerm . ' of ' . CRM_Utils_Money::format($opt['tax_amount']) . ')</span>';
+ $opt['label'] = $pre_help . '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . '</span>';
+ $opt['label'] .= '<span class="crm-price-amount-tax"> (includes ' . $taxTerm . ' of ' . CRM_Utils_Money::format($opt['tax_amount']) . ')</span>' . $post_help;
}
else {
- $opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName]) . '</span>';
- $opt['label'] .= '<span class="crm-price-amount-tax"> + ' . CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . '</span>';
+ $opt['label'] = $pre_help . '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName]) . '</span>';
+ $opt['label'] .= '<span class="crm-price-amount-tax"> + ' . CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . '</span>' . $post_help;
}
}
else {
- $opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName]) . '</span>';
+ $opt['label'] = $pre_help . '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName]) . '</span>' . $post_help;
}
}
$count = CRM_Utils_Array::value('count', $opt, '');
}
$choice[$opId] = $qf->createElement('radio', NULL, '', $opt['label'], $opt['id'], $extra);
-
if ($is_pay_later) {
$qf->add('text', 'txt-' . $elementName, $label, array('size' => '4'));
}
$max_value = CRM_Utils_Array::value('max_value', $opt, '');
if ($field->is_display_amounts) {
+ $pre_help = isset($opt['help_pre']) ?
+ '<span class="crm-price-amount-help-pre">' . $opt['help_pre'] . '</span>: ' : '';
+ $post_help = isset($opt['help_post']) ?
+ ': <span class="crm-price-amount-help-post">' . $opt['help_post'] . '</span>' : '';
$opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span> - ';
if (isset($taxAmount) && $invoicing) {
- $opt['label'] .= self::getTaxLabel($opt, $valueFieldName, $displayOpt, $taxTerm);
+ $opt['label'] .= $pre_help . self::getTaxLabel($opt, $valueFieldName, $displayOpt, $taxTerm) . $post_help;
}
else {
- $opt['label'] .= CRM_Utils_Money::format($opt[$valueFieldName]);
+ $opt['label'] .= $pre_help . CRM_Utils_Money::format($opt[$valueFieldName]) . $post_help;
}
}
$priceVal = implode($seperator, array($opt[$valueFieldName] + $taxAmount, $count, $max_value));
<td class="label">{$form.description.label}</td>
<td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$optionId}{/if}{$form.description.html}</td>
</tr>
+ <tr class="crm-price-option-form-block-help-pre">
+ <td class="label">{$form.help_pre.label}</td>
+ <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='help_pre' id=$optionId}{/if}{$form.help_pre.html}</td>
+ </tr>
+ <tr class="crm-price-option-form-block-help-post">
+ <td class="label">{$form.help_post.label}</td>
+ <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='help_post' id=$optionId}{/if}{$form.help_post.html}</td>
+ </tr>
<tr class="crm-price-option-form-block-financial-type">
<td class="label">{$form.financial_type_id.label}</td>
<td>
<tr>
<th>{ts}Option Label{/ts}</th>
<th>{ts}Option Amount{/ts}</th>
+ <th>{ts}Pre Help{/ts}</th>
+ <th>{ts}Post Help{/ts}</th>
{if $isEvent}
<th>{ts}Participant Count{/ts}</th>
<th>{ts}Maximum{/ts}</th>
<tr id="price_field_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-price-option-label crm-editable" data-field="label">{$row.label}</td>
<td class="crm-price-option-value">{$row.amount|crmMoney}</td>
+ <td class="crm-price-option-pre-help">{$row.help_pre}</td>
+ <td class="crm-price-option-post-help">{$row.help_post}</td>
{if $isEvent}
<td class="crm-price-option-count">{$row.count}</td>
<td class="crm-price-option-max">{$row.max_value}</td>