Fix dev/core#3168 broken download contribution invoice button
authorColeman Watts <coleman@civicrm.org>
Tue, 19 Apr 2022 22:43:52 +0000 (18:43 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 19 Apr 2022 22:43:52 +0000 (18:43 -0400)
CRM/Contribute/Form/ContributionView.php
templates/CRM/common/formButtons.tpl

index f71c4272da4dd4cc5858f3076a2dcf9e48f03617..dadb38ac8e284ae0b95af0351b7bcd1a1d10fad4 100644 (file)
@@ -308,6 +308,7 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
         'title' => $invoiceButtonText,
         'url' => 'civicrm/contribute/invoice',
         'qs' => $pdfUrlParams,
+        'class' => 'no-popup',
         'icon' => 'fa-download',
       ];
       $linkButtons[] = [
index 0652d10b45e8a07184173a4ae782c2e314209123..649739f5741c709eccf1bd090535256cfbf10e4c 100644 (file)
@@ -24,7 +24,7 @@
       {capture assign=linkname}name="{$linkButton.ref}"{/capture}
     {else}{capture assign=linkname}name="{$linkButton.name}"{/capture}
     {/if}
-    <a class="button" {$linkname} href="{crmURL p=$linkButton.url q=$linkButton.qs}" {$accessKey} {$linkButton.extra}><span>{$icon|smarty:nodefaults}{$linkButton.title}</span></a>
+    <a class="button{if array_key_exists('class', $linkButton)} {$linkButton.class}{/if}" {$linkname} href="{crmURL p=$linkButton.url q=$linkButton.qs}" {$accessKey} {$linkButton.extra}><span>{$icon|smarty:nodefaults}{$linkButton.title}</span></a>
   {/foreach}
 {/if}