Merge pull request #2546 from brylie/master
[civicrm-core.git] / templates / CRM / Event / Form / Participant.tpl
index bb6705bf658a9fcbe8ca19ed08b456a961c2b48b..a78d125d971806c71e5108e2eaa3f8936fd4b961 100644 (file)
   // change the status to default 'partially paid' for partial payments
   var feeAmount;
   var userModifiedAmount;
-  var partiallyPaidStatusId = {/literal}{$partiallyPaidStatusId}{literal};
 
   cj('#total_amount')
    .focus(
       userModifiedAmount = cj(this).val();
       userModifiedAmount = parseInt(userModifiedAmount);
       if (userModifiedAmount < feeAmount) {
-        cj('#status_id').val(partiallyPaidStatusId);
+        cj('#status_id').val(CRM.partiallyPaidStatusId);
       }
     }
   );
     function(e) {
       var userSubmittedStatus = cj('#status_id').val();
       var statusLabel = cj('#status_id option:selected').text();
-      if (userModifiedAmount < feeAmount && userSubmittedStatus != partiallyPaidStatusId) {
+      if (userModifiedAmount < feeAmount && userSubmittedStatus != CRM.partiallyPaidStatusId) {
         var result = confirm('Payment amount is less than the amount owed. Expected participant status is \'Partially paid\'. Are you sure you want to set the participant status to ' + statusLabel + '? Click OK to continue, Cancel to change your entries.');
         if (result == false) {
           e.preventDefault();
   </script>
   {/literal}
   {/if}
-  {if $participantId}
-    {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'}
-  {/if}
   {include file="CRM/Event/Form/EventFees.tpl"}
 {elseif $cdType}
   {include file="CRM/Custom/Form/CustomData.tpl"}
             {if !$participantMode and !$email and $outBound_option != 2 }
               {assign var='profileCreateCallback' value=1}
             {/if}
-          {include file="CRM/Contact/Form/NewContact.tpl"}
+            <tr class="crm-participant-form-contact-id">
+              <td class="label">{$form.contact_id.label}</td>
+              <td>{$form.contact_id.html}</td>
+            </tr>
           {/if}
           {if $action EQ 2}
             {if $additionalParticipants} {* Display others registered by this participant *}
     </div>
   </div>
   {if $action eq 1 or $action eq 2}
+    {if $participantId}
+      {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'}
+    {/if}
     {literal}
     <script type="text/javascript">
     // event select