From 473739d08810f8ddb20a17cd35af0b367a5c03de Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 24 Mar 2023 09:17:53 +1300 Subject: [PATCH] Fix import contribution url --- CRM/Contribute/Import/Parser/Contribution.php | 2 +- CRM/Contribute/xml/Menu/Contribute.xml | 8 -------- CRM/Core/xml/Menu/Import.xml | 8 ++++++++ sql/civicrm_generated.mysql | 4 ++-- sql/test_data_second_domain.mysql | 2 +- templates/CRM/Contribute/Page/DashBoard.hlp | 4 ++-- xml/templates/civicrm_navigation.tpl | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index 3ea1b4e41c..c915903bb5 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -52,7 +52,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser { 'name' => 'contribution_import', 'label' => ts('Contribution Import'), 'entity' => 'Contribution', - 'url' => 'civicrm/contribute/import', + 'url' => 'civicrm/import/contribution', ], ]; } diff --git a/CRM/Contribute/xml/Menu/Contribute.xml b/CRM/Contribute/xml/Menu/Contribute.xml index 011535753f..77b12723e4 100644 --- a/CRM/Contribute/xml/Menu/Contribute.xml +++ b/CRM/Contribute/xml/Menu/Contribute.xml @@ -200,14 +200,6 @@ 1 588 - - civicrm/contribute/import - Import Contributions - CRM_Contribute_Import_Controller - access CiviContribute,edit contributions - 1 - 520 - civicrm/contribute/manage Manage Contribution Pages diff --git a/CRM/Core/xml/Menu/Import.xml b/CRM/Core/xml/Menu/Import.xml index a4474414bb..da0202ec74 100644 --- a/CRM/Core/xml/Menu/Import.xml +++ b/CRM/Core/xml/Menu/Import.xml @@ -39,6 +39,14 @@ CRM_Activity_Import_Controller 420 + + civicrm/import/contribution + Import Contributions + CRM_Contribute_Import_Controller + access CiviContribute,edit contributions + 1 + 520 + civicrm/import/custom id=%%id%% diff --git a/sql/civicrm_generated.mysql b/sql/civicrm_generated.mysql index ec845af86a..d20812ebab 100644 --- a/sql/civicrm_generated.mysql +++ b/sql/civicrm_generated.mysql @@ -5249,7 +5249,7 @@ INSERT INTO `civicrm_menu` (`id`, `domain_id`, `path`, `path_arguments`, `title` (325,1,'civicrm/contact/view/contribution/additionalinfo',NULL,'Additional Info','a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:3:{i:0;s:14:\"access CiviCRM\";i:1;s:15:\"edit my contact\";i:2;s:15:\"view my contact\";}i:1;s:2:\"or\";}','s:34:\"CRM_Contribute_Form_AdditionalInfo\";',NULL,'a:3:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:15:\"Contact Summary\";s:3:\"url\";s:45:\"/civicrm/contact/view?reset=1&cid=%%cid%%\";}i:2;a:2:{s:5:\"title\";s:13:\"Contributions\";s:3:\"url\";s:42:\"/civicrm/contact/view/contribution?reset=1\";}}',NULL,NULL,NULL,1,0,1,0,1,1,0,0,'a:0:{}'), (326,1,'civicrm/contribute/search',NULL,'Find Contributions','a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:1:{i:0;s:21:\"access CiviContribute\";}i:1;s:3:\"and\";}','s:32:\"CRM_Contribute_Controller_Search\";',NULL,'a:2:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:24:\"CiviContribute Dashboard\";s:3:\"url\";s:27:\"/civicrm/contribute?reset=1\";}}',NULL,NULL,2,1,0,1,0,510,1,1,0,'a:0:{}'), (327,1,'civicrm/contribute/searchBatch',NULL,NULL,'a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:1:{i:0;s:21:\"access CiviContribute\";}i:1;s:3:\"and\";}','s:37:\"CRM_Contribute_Controller_SearchBatch\";',NULL,'a:2:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:24:\"CiviContribute Dashboard\";s:3:\"url\";s:27:\"/civicrm/contribute?reset=1\";}}',NULL,NULL,2,1,0,1,0,588,1,1,0,'a:0:{}'), - (328,1,'civicrm/contribute/import',NULL,'Import Contributions','a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:2:{i:0;s:21:\"access CiviContribute\";i:1;s:18:\"edit contributions\";}i:1;s:3:\"and\";}','s:32:\"CRM_Contribute_Import_Controller\";',NULL,'a:2:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:24:\"CiviContribute Dashboard\";s:3:\"url\";s:27:\"/civicrm/contribute?reset=1\";}}',NULL,NULL,2,1,0,1,0,520,1,1,0,'a:0:{}'), + (328,1,'civicrm/import/contribution',NULL,'Import Contributions','a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:2:{i:0;s:21:\"access CiviContribute\";i:1;s:18:\"edit contributions\";}i:1;s:3:\"and\";}','s:32:\"CRM_Contribute_Import_Controller\";',NULL,'a:2:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:24:\"CiviContribute Dashboard\";s:3:\"url\";s:27:\"/civicrm/contribute?reset=1\";}}',NULL,NULL,2,1,0,1,0,520,1,1,0,'a:0:{}'), (329,1,'civicrm/contribute/manage',NULL,'Manage Contribution Pages','a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:2:{i:0;s:18:\"administer CiviCRM\";i:1;s:21:\"access CiviContribute\";}i:1;s:3:\"and\";}','s:36:\"CRM_Contribute_Page_ContributionPage\";',NULL,'a:2:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:24:\"CiviContribute Dashboard\";s:3:\"url\";s:27:\"/civicrm/contribute?reset=1\";}}',NULL,NULL,2,1,0,1,0,530,1,1,0,'a:0:{}'), (330,1,'civicrm/contribute/additionalinfo',NULL,'AdditionalInfo Form','a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:1:{i:0;s:21:\"access CiviContribute\";}i:1;s:3:\"and\";}','s:34:\"CRM_Contribute_Form_AdditionalInfo\";',NULL,'a:2:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}i:1;a:2:{s:5:\"title\";s:24:\"CiviContribute Dashboard\";s:3:\"url\";s:27:\"/civicrm/contribute?reset=1\";}}',NULL,NULL,2,1,0,1,0,0,1,0,0,'a:0:{}'), (331,1,'civicrm/ajax/permlocation',NULL,NULL,'a:2:{i:0;s:19:\"CRM_Core_Permission\";i:1;s:9:\"checkMenu\";}','a:2:{i:0;a:1:{i:0;s:25:\"make online contributions\";}i:1;s:3:\"and\";}','a:2:{i:0;s:27:\"CRM_Core_Page_AJAX_Location\";i:1;s:23:\"getPermissionedLocation\";}',NULL,'a:1:{i:0;a:2:{s:5:\"title\";s:7:\"CiviCRM\";s:3:\"url\";s:16:\"/civicrm?reset=1\";}}',NULL,NULL,NULL,1,0,1,0,1,1,0,0,'a:0:{}'), @@ -5497,7 +5497,7 @@ INSERT INTO `civicrm_navigation` (`id`, `domain_id`, `label`, `name`, `url`, `ic (29,1,'New Contribution','New Contribution','civicrm/contribute/add?reset=1&action=add&context=standalone',NULL,'access CiviContribute,edit contributions','AND',27,1,NULL,2), (30,1,'Find Contributions','Find Contributions','civicrm/contribute/search?reset=1',NULL,'access CiviContribute','',27,1,NULL,3), (31,1,'Contribution Reports','Contribution Reports','civicrm/report/list?compid=2&reset=1',NULL,'access CiviContribute','',27,1,1,4), - (32,1,'Import Contributions','Import Contributions','civicrm/contribute/import?reset=1',NULL,'access CiviContribute,edit contributions','AND',27,1,1,5), + (32,1,'Import Contributions','Import Contributions','civicrm/import/contribution?reset=1',NULL,'access CiviContribute,edit contributions','AND',27,1,1,5), (33,1,'Batch Data Entry','Batch Data Entry','civicrm/batch?reset=1',NULL,'access CiviContribute','',27,1,NULL,7), (34,1,'Pledges','Pledges',NULL,NULL,'access CiviPledge','',27,1,1,6), (35,1,'Accounting Batches','Accounting Batches',NULL,NULL,'view own manual batches,view all manual batches','OR',27,1,1,8), diff --git a/sql/test_data_second_domain.mysql b/sql/test_data_second_domain.mysql index 09a94fce4d..0007a7a6a9 100644 --- a/sql/test_data_second_domain.mysql +++ b/sql/test_data_second_domain.mysql @@ -132,7 +132,7 @@ VALUES ( @domainID, 'civicrm/contribute/add&reset=1&action=add&context=standalone', 'New Contribution', 'New Contribution', 'access CiviContribute,edit contributions', 'AND', @contributionlastID, '1', NULL, 2 ), ( @domainID, 'civicrm/contribute/search&reset=1', 'Find Contributions', 'Find Contributions', 'access CiviContribute', '', @contributionlastID, '1', NULL, 3 ), ( @domainID, 'civicrm/batch&reset=1', 'Batches', 'Batches', 'access CiviContribute,access CiviMember', '', @contributionlastID, '1', NULL, 4 ), - ( @domainID, 'civicrm/contribute/import&reset=1', 'Import Contributions', 'Import Contributions', 'access CiviContribute,edit contributions', 'AND', @contributionlastID, '1', '1', 5 ); + ( @domainID, 'civicrm/import/contribution&reset=1', 'Import Contributions', 'Import Contributions', 'access CiviContribute,edit contributions', 'AND', @contributionlastID, '1', '1', 5 ); INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) diff --git a/templates/CRM/Contribute/Page/DashBoard.hlp b/templates/CRM/Contribute/Page/DashBoard.hlp index e1262b6848..c295ea7c17 100644 --- a/templates/CRM/Contribute/Page/DashBoard.hlp +++ b/templates/CRM/Contribute/Page/DashBoard.hlp @@ -12,9 +12,9 @@ {/htxt} {htxt id="id-contribute-intro"} {capture assign=findContactURL}{crmURL p="civicrm/contact/search/basic" q="reset=1"}{/capture} - {capture assign=importURL}{crmURL p="civicrm/contribute/import" q="reset=1"}{/capture} + {capture assign=importURL}{crmURL p="civicrm/import/contribution" q="reset=1"}{/capture}

{ts 1=$findContactURL 2=$importURL}CiviContribute allows you to create customized page(s) for collecting online contributions. You can also input and track offline contributions. To enter contributions manually for individual contacts, use Find Contacts to locate the contact. Then click View to go to their summary page and click on the New Contribution link. You can also import batches of offline contributions from other sources.{/ts}

- + {capture assign=findContribsURL}{crmURL p="civicrm/contribute/search/basic" q="reset=1"}{/capture}

{ts 1=$findContribsURL}The Contribution Summary table provides a summary of month and year-to-date contribution totals, and includes shortcuts to view the contribution details for these commonly used search periods. To run your own customized searches - click Find Contributions. You can search by Contributor Name, Amount Range, and a variety of other criteria.{/ts}

{/htxt} diff --git a/xml/templates/civicrm_navigation.tpl b/xml/templates/civicrm_navigation.tpl index e54bff8533..fdf300ea9b 100644 --- a/xml/templates/civicrm_navigation.tpl +++ b/xml/templates/civicrm_navigation.tpl @@ -105,7 +105,7 @@ VALUES ( @domainID, 'civicrm/contribute/add?reset=1&action=add&context=standalone', '{ts escape="sql" skip="true"}New Contribution{/ts}', 'New Contribution', 'access CiviContribute,edit contributions', 'AND', @contributionlastID, '1', NULL, 2 ), ( @domainID, 'civicrm/contribute/search?reset=1', '{ts escape="sql" skip="true"}Find Contributions{/ts}', 'Find Contributions', 'access CiviContribute', '', @contributionlastID, '1', NULL, 3 ), ( @domainID, 'civicrm/report/list?compid=2&reset=1', '{ts escape="sql" skip="true"}Contribution Reports{/ts}', 'Contribution Reports', 'access CiviContribute', '', @contributionlastID, '1', 1, 4 ), - ( @domainID, 'civicrm/contribute/import?reset=1', '{ts escape="sql" skip="true"}Import Contributions{/ts}', 'Import Contributions', 'access CiviContribute,edit contributions', 'AND', @contributionlastID, '1', '1', 5 ), + ( @domainID, 'civicrm/import/contribution?reset=1', '{ts escape="sql" skip="true"}Import Contributions{/ts}', 'Import Contributions', 'access CiviContribute,edit contributions', 'AND', @contributionlastID, '1', '1', 5 ), ( @domainID, 'civicrm/batch?reset=1', '{ts escape="sql" skip="true"}Batch Data Entry{/ts}', 'Batch Data Entry', 'access CiviContribute', '', @contributionlastID, '1', NULL, 7 ); INSERT INTO civicrm_navigation -- 2.25.1