Petition Signature: add an Edit link for admins
authorMathieu Lutfy <mathieu@symbiotic.coop>
Wed, 26 Oct 2022 18:27:22 +0000 (14:27 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Wed, 26 Oct 2022 18:27:22 +0000 (14:27 -0400)
templates/CRM/Campaign/Form/Petition/Signature.tpl

index fe059cc3892b1c6ab47d859abaa49cb522d95be5..f34c4367677f107750a0750fdffe8a82046bc7d9 100644 (file)
 
 <script>
 {literal}
-
   if (typeof(cj) === 'undefined') cj = jQuery;
 {/literal}
 </script>
 
+{if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCampaign') }
+  {capture assign="buttonTitle"}{ts}Edit Petition{/ts}{/capture}
+  {crmButton target="_blank" p="civicrm/petition/add" q="reset=1&action=update&id=`$petition.id`" fb=1 title="$buttonTitle" icon="fa-wrench"}{ts}Configure{/ts}{/crmButton}
+  <div class='clear'></div>
+{/if}
+
 <div id="intro" class="crm-section">{$petition.instructions}</div>
 <div class="crm-block crm-petition-form-block">