From e3f073761411ac9411acb50c188d48a2e838a2b1 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 10 Jan 2024 16:09:53 -0800 Subject: [PATCH] Status Check Actions - Allow off-site info link ("More info"). Update docblock. --- CRM/Utils/Check/Message.php | 3 +++ ang/crmStatusPage/StatusPageCtrl.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Check/Message.php b/CRM/Utils/Check/Message.php index 8aae42516f..deb4a4b6cb 100644 --- a/CRM/Utils/Check/Message.php +++ b/CRM/Utils/Check/Message.php @@ -155,6 +155,9 @@ class CRM_Utils_Check_Message { * Currently supports: api3 or href * @param array $params * Params to be passed to CRM.api3 or CRM.url depending on type + * Ex: ['MyApiEntity', 'MyApiAction', [...params...]] + * Ex: ['path' => 'civicrm/admin/foo', 'query' => 'reset=1'] + * Ex: ['url' => 'https://example.com/more/info'] * @param string $icon * Fa-icon class for the button */ diff --git a/ang/crmStatusPage/StatusPageCtrl.js b/ang/crmStatusPage/StatusPageCtrl.js index 737518d190..b1bc2ec229 100644 --- a/ang/crmStatusPage/StatusPageCtrl.js +++ b/ang/crmStatusPage/StatusPageCtrl.js @@ -51,7 +51,7 @@ function run() { switch (action.type) { case 'href': - window.location = CRM.url(action.params.path, action.params.query, action.params.mode); + window.location = action.params.url ? action.params.url : CRM.url(action.params.path, action.params.query, action.params.mode); break; case 'api3': -- 2.25.1