CRM-16645 - Fix js scope issue affecting popup contribution edit forms
authorColeman Watts <coleman@civicrm.org>
Tue, 7 Jul 2015 00:54:28 +0000 (20:54 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 7 Jul 2015 00:54:28 +0000 (20:54 -0400)
templates/CRM/Contribute/Form/PCP.js.tpl

index 846cc19f818443ba4a6e8b3eb117c7bc2c3f0d1d..11fa37f793ead5fd17debf465d6ec0151e711d75 100644 (file)
@@ -30,7 +30,7 @@
 
     // FIXME: This could be much simpler as an entityRef field but pcp doesn't have a searchable api :(
     var pcpURL = CRM.url('civicrm/ajax/rest', 'className=CRM_Contact_Page_AJAX&fnName=getPCPList&json=1&context=contact&reset=1');
-    $('#pcp_made_through_id').crmSelect2({
+    $('input[name=pcp_made_through_id]', $form).crmSelect2({
       minimumInputLength: 1,
       ajax: {
         url: pcpURL,