Skip to content

Commit

Permalink
COMCL-640: Ensure submit buttons will validate the form properly
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Aug 5, 2024
1 parent c67a088 commit 34e8142
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions civicase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 34e8142

Please sign in to comment.