Merge remote-tracking branch 'upstream/master' into pledge-batchentry
[civicrm-core.git] / templates / CRM / Event / Form / ParticipantFeeSelection.tpl
index 50f84fb49cc6e425c237263b351f268ddbc011b8..83f92b8344c60df162cb99ef411ca68e652dc7c4 100644 (file)
@@ -27,6 +27,9 @@
 {literal}
 <script type='text/javascript'>
 function display(totalfee) {
+  {/literal}{if $optionFullTotalAmount}
+    totalfee += {$optionFullTotalAmount};{/if}
+  {literal};
   // totalfee is monetary, round it to 2 decimal points so it can
   // go as a float - CRM-13491
   totalfee = Math.round(totalfee*100)/100;
@@ -103,7 +106,7 @@ CRM.$(function($) {
     <div class="icon inform-icon"></div>&nbsp;{ts}You will not be able to send an automatic email receipt for this payment because there is no email address recorded for this contact. If you want a receipt to be sent when this payment is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the payment.{/ts}
   </div>
   {/if}
-  <table class="form-layout">    
+  <table class="form-layout">
     <tr>
       <td class="font-size12pt label"><strong>{ts}Participant{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
     </tr>
@@ -119,9 +122,9 @@ CRM.$(function($) {
        <td class="label">{ts}Current Selections{/ts}</td>
        <td>{include file="CRM/Price/Page/LineItem.tpl" context="Event"}</td>
      </tr>
-  {/if} 
+  {/if}
   </table>
-  
+
   {if $priceSet.fields}
     <fieldset id="priceset" class="crm-group priceset-group">
       <table class='form-layout'>
@@ -131,7 +134,7 @@ CRM.$(function($) {
         </tr>
      {if $paymentInfo}
        <tr><td></td><td>
-         <div class='crm-section'> 
+         <div class='crm-section'>
          <div class='label'>{ts}Updated Fee(s){/ts}</div><div id="pricevalue" class='content updated-fee'></div>
          <div class='label'>{ts}Total Paid{/ts}</div>
          <div class='content'>
@@ -141,7 +144,7 @@ CRM.$(function($) {
          <div class='label'><strong>{ts}Balance Owed{/ts}</strong></div><div class='content'><strong id='balance-fee'></strong></div>
           </div>
        {include file='CRM/Price/Form/Calculate.tpl' currencySymbol=$currencySymbol noCalcValueDisplay='false' displayOveride='true'}
-       {/if}    
+       {/if}
       </table>
     </fieldset>
   {/if}
@@ -199,9 +202,10 @@ CRM.$(function($) {
 {literal}
 <script type='text/javascript'>
 CRM.$(function($) {
-  cj('.total_amount-section').remove(); 
+  var $form = $('form.{/literal}{$form.formClass}{literal}');
+  cj('.total_amount-section').remove();
 
-  cj('#ParticipantFeeSelection').submit(function(e) {
+  cj($form).submit(function(e) {
     var partiallyPaid = {/literal}{$partiallyPaid}{literal};
     var pendingRefund = {/literal}{$pendingRefund}{literal};
     var statusId = cj('#status_id').val();