From 533ccb95364c10c5d2117c858a2509d89b9d1049 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Wed, 11 Nov 2015 16:23:29 -0800 Subject: [PATCH] CRM-17176 - Improve confirm message for clean-up reports menu task. Fix bug in navigation api. ---------------------------------------- * CRM-17176: Add api action to reset reports menu https://issues.civicrm.org/jira/browse/CRM-17176 --- api/v3/Navigation.php | 4 ++-- templates/CRM/Admin/Page/Navigation.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/v3/Navigation.php b/api/v3/Navigation.php index e47b5636da..e920e81d22 100644 --- a/api/v3/Navigation.php +++ b/api/v3/Navigation.php @@ -60,9 +60,9 @@ function _civicrm_api3_navigation_reset_spec(&$params) { */ function civicrm_api3_navigation_reset($params) { if ($params['for'] == 'report') { - CRM_Core_BAO_Navigation::resetNavigation(); + CRM_Core_BAO_Navigation::rebuildReportsNavigation($params['domain_id']); } - CRM_Core_BAO_Navigation::rebuildReportsNavigation($params['domain_id']); + CRM_Core_BAO_Navigation::resetNavigation(); return civicrm_api3_create_success(1, $params, 'navigation', 'reset'); } diff --git a/templates/CRM/Admin/Page/Navigation.tpl b/templates/CRM/Admin/Page/Navigation.tpl index 7399bdeacc..1c0ce8646a 100644 --- a/templates/CRM/Admin/Page/Navigation.tpl +++ b/templates/CRM/Admin/Page/Navigation.tpl @@ -174,7 +174,7 @@ e.preventDefault(); CRM.confirm({ title: $(this).text(), - message: '{/literal}{ts escape='js'}This will rebuild the "Reports" menu to include all currently active reports.{/ts}{literal}' + message: '{/literal}{ts escape='js'}This will add links for all currently active reports to the "Reports" menu under the relevant component. If you have added report instances to other menus, they will be moved to "Reports". Are you sure?{/ts}{literal}' }) .on('crmConfirm:yes', function() { $('#crm-container').block(); -- 2.25.1