From da1ea5a85bbf539deb0be69345181a96b9874a3f Mon Sep 17 00:00:00 2001 From: olayiwola-compucorp Date: Wed, 11 Sep 2024 15:06:58 +0100 Subject: [PATCH] COMCl-752: Resolve issue with civicase role accessing template --- civicase.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/civicase.php b/civicase.php index b2e8c81cb..f0b5f904d 100644 --- a/civicase.php +++ b/civicase.php @@ -647,6 +647,10 @@ function civicase_civicrm_alterContent(&$content, $context, $tplName, &$object) } } + if ($context == "form" && $tplName == "CRM/Contact/Form/Task/PDF.tpl") { + $content = str_replace("showSaveDetails(\$('input[name=saveTemplate]', \$form)[0]);", "if (\$('input[name=saveTemplate]').length) { showSaveDetails(\$('input[name=saveTemplate]', \$form)[0]); }", $content); + } + $hooks = [ new CRM_Civicase_Hook_alterContent_AddSalesOrderLineToContribution($content, $context, $tplName), ];