Merge pull request #4123 from eileenmcnaughton/CRM-15296
[civicrm-core.git] / templates / CRM / common / paymentBlock.tpl
index 6d75285acbbae4fe638f50276e738584fcfe3f01..d9f04277324527627dee029e8b010289ca09aef3 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -50,20 +50,19 @@ function buildPaymentBlock( type ) {
     {/if}
   {literal}
 
-  var fname = '#billing-payment-block';
   var response = cj.ajax({
                         url: dataUrl,
                         async: false
                         }).responseText;
 
-    cj( fname ).html( response );
+  cj('#billing-payment-block').html(response).trigger('crmLoad').trigger('crmFormLoad');
 }
 
-cj( function() {
-    cj('.crm-group.payment_options-group').show();
+CRM.$(function($) {
+    $('.crm-group.payment_options-group').show();
 
-    cj('input[name="payment_processor"]').change( function() {
-        buildPaymentBlock( cj(this).val() );
+    $('input[name="payment_processor"]').change( function() {
+        buildPaymentBlock( $(this).val() );
     });
 });