From: eileen Date: Fri, 6 Nov 2015 07:52:02 +0000 (-0800) Subject: CRM-16929 price set calcs X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=70af95e4cd0cadb62fb3dbccc7fadb4f07b6d18f;p=civicrm-core.git CRM-16929 price set calcs Consolidate calculation to a single function, always store calculated total on the form (even if not visible) for consistent calcs. This means the 'raw-data' attribute is calculated regardless of whether we are working with a 'price set' or a 'quick config' priceset and can always be used for calculating whether to show it --- diff --git a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl index b9c42612b0..608d496c72 100644 --- a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl +++ b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl @@ -130,7 +130,7 @@ CRM.$(function($) { - + {if $paymentInfo}
{$form.amount.label}{include file="CRM/Price/Form/PriceSet.tpl" extends="Event" dontInclCal="true" context="participant"}
{include file="CRM/Price/Form/PriceSet.tpl" extends="Event" noCalcValueDisplay=0 context="participant"}
@@ -143,7 +143,7 @@ CRM.$(function($) {
{ts}Balance Owed{/ts}
- {include file='CRM/Price/Form/Calculate.tpl' currencySymbol=$currencySymbol noCalcValueDisplay='false' displayOveride='true'} + {include file='CRM/Price/Form/Calculate.tpl' currencySymbol=$currencySymbol noCalcValueDisplay=1 displayOveride='true'} {/if}
diff --git a/templates/CRM/Price/Form/Calculate.tpl b/templates/CRM/Price/Form/Calculate.tpl index 1227b798ce..f460ee7864 100644 --- a/templates/CRM/Price/Form/Calculate.tpl +++ b/templates/CRM/Price/Form/Calculate.tpl @@ -23,16 +23,22 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $noCalcValueDisplay neq 'false'} + +{assign var='hideTotal' value=$quickConfig+$noCalcValueDisplay}
-
-
+ {if !$hideTotal} +
+ +
+ {/if} +
-{/if} +