dev/financial#66 - Fix missing contribution ID for AdditionalInfo
authorPatrick Figel <pfigel@greenpeace.org>
Thu, 22 Aug 2019 20:27:52 +0000 (22:27 +0200)
committerPatrick Figel <pfigel@greenpeace.org>
Thu, 22 Aug 2019 21:18:01 +0000 (23:18 +0200)
This fixes an issues where the contribution ID is not being passed
when the AdditionalInfo form block is retrieved in the contribution
form. This causes existing values of fields in this block to not be
loaded, leading to data loss when the form is saved.

templates/CRM/Contribute/Form/Contribution.tpl

index f412e28fe35263b876631d4771281bb9d05d1951..bb6483ebf1e1ff7e824e3a53b83e75073bf1e108 100644 (file)
     });
     // load panes function calls for snippet based on id of crm-accordion-header
     function loadPanes( id ) {
-      var url = "{/literal}{crmURL p='civicrm/contact/view/contribution' q='snippet=4&formType=' h=0}{literal}" + id;
+      var url = "{/literal}{crmURL p='civicrm/contact/view/contribution' q="snippet=4&id=`$entityID`&formType=" h=0}{literal}" + id;
       {/literal}
       {if $contributionMode}
         url = url + "&mode={$contributionMode}";