diff --git a/civicase.php b/civicase.php index 9ef585afc..06fda2738 100644 --- a/civicase.php +++ b/civicase.php @@ -634,3 +634,16 @@ function civicase_civicrm_searchTasks(string $objectName, array &$tasks) { } } } + +/** + * Implements hook_civicrm_alterContent(). + */ +function civicase_civicrm_alterContent(&$content, $context, $tplName, &$object) { + if ($context == "form") { + if ($tplName == "CRM/Activity/Form/Activity.tpl") { + // See: templates/CRM/Core/Form/RecurringEntity.tpl#209 + // Ensure submit buttons will validate the form properly. + $content = str_replace("#_qf_Activity_upload-top, #_qf_Activity_upload-bottom", "#_qf_Activity_upload-top, #_qf_Activity_upload-bottom, #_qf_Activity_submit-bottom, #_qf_Activity_submit-top", $content); + } + } +}