Skip to content

Commit

Permalink
COMCl-752: Resolve issue with civicase role accessing template
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Sep 11, 2024
1 parent 4bc86de commit da1ea5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions civicase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
];
Expand Down

0 comments on commit da1ea5a

Please sign in to comment.