From e3534b7abbad501779131c1d3c57df1928fca14e Mon Sep 17 00:00:00 2001 From: 19ATF72 Date: Tue, 5 Dec 2023 16:05:16 -0800 Subject: [PATCH] Fix edit button for 'Import/Export Mapping' --- CRM/Admin/Form/Mapping.php | 7 +++++++ CRM/Core/DAO/Mapping.php | 13 ++++++++++++- CRM/Core/xml/Menu/Admin.xml | 8 ++++++++ xml/schema/Core/Mapping.xml | 5 +++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CRM/Admin/Form/Mapping.php b/CRM/Admin/Form/Mapping.php index eb304f5f76..941fb616b7 100644 --- a/CRM/Admin/Form/Mapping.php +++ b/CRM/Admin/Form/Mapping.php @@ -20,6 +20,13 @@ */ class CRM_Admin_Form_Mapping extends CRM_Admin_Form { + /** + * @return string + */ + public function getDefaultEntity(): string { + return 'Mapping'; + } + /** * @var bool */ diff --git a/CRM/Core/DAO/Mapping.php b/CRM/Core/DAO/Mapping.php index ea97b6fb35..9a4ba13140 100644 --- a/CRM/Core/DAO/Mapping.php +++ b/CRM/Core/DAO/Mapping.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/Mapping.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:31c8504ccda047a088caeec8bd925d3b) + * (GenCodeChecksum:981063692534917d20a9c12fb65bbd8e) */ /** @@ -37,6 +37,17 @@ class CRM_Core_DAO_Mapping extends CRM_Core_DAO { */ public static $_log = FALSE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/admin/mapping/edit?reset=1&action=add', + 'browse' => 'civicrm/admin/mapping?reset=1', + 'update' => 'civicrm/admin/mapping/edit?reset=1&action=update&id=[id]', + ]; + /** * Mapping ID * diff --git a/CRM/Core/xml/Menu/Admin.xml b/CRM/Core/xml/Menu/Admin.xml index e74d381a9c..7a8f4e0093 100644 --- a/CRM/Core/xml/Menu/Admin.xml +++ b/CRM/Core/xml/Menu/Admin.xml @@ -555,6 +555,14 @@ System Settings 110 + + civicrm/admin/mapping/edit + Import/Export Mappings + Import and Export mappings allow you to easily run the same job multiple times. This option allows you to rename or delete existing mappings. + CRM_Admin_Form_Mapping + System Settings + 111 + civicrm/admin/setting/debug Debugging diff --git a/xml/schema/Core/Mapping.xml b/xml/schema/Core/Mapping.xml index fb1811b9b6..3045914e34 100644 --- a/xml/schema/Core/Mapping.xml +++ b/xml/schema/Core/Mapping.xml @@ -7,6 +7,11 @@ Store field mappings in import or export for reuse name Field Mapping + + civicrm/admin/mapping/edit?reset=1&action=add + civicrm/admin/mapping?reset=1 + civicrm/admin/mapping/edit?reset=1&action=update&id=[id] + 1.2 id -- 2.25.1