Fix edit button for 'Import/Export Mapping'
author19ATF72 <micah.hobby@gmail.com>
Wed, 6 Dec 2023 00:05:16 +0000 (16:05 -0800)
committereileen <emcnaughton@wikimedia.org>
Thu, 28 Dec 2023 02:57:00 +0000 (15:57 +1300)
CRM/Admin/Form/Mapping.php
CRM/Core/DAO/Mapping.php
CRM/Core/xml/Menu/Admin.xml
xml/schema/Core/Mapping.xml

index eb304f5f763758c6aa1e94d63038669319a910d4..941fb616b7b3b47759cb520754b8a46982bc8d95 100644 (file)
  */
 class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
 
+  /**
+   * @return string
+   */
+  public function getDefaultEntity(): string {
+    return 'Mapping';
+  }
+
   /**
    * @var bool
    */
index ea97b6fb35bbb1e03ce9fd110815194ba799166c..9a4ba13140963cb590c927185f1bc0ff8cb5c728 100644 (file)
@@ -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
    *
index e74d381a9c3a7586afc5408ff3729ad26a7093e1..7a8f4e00931826ee35808f484825d8fd975f5655 100644 (file)
      <adminGroup>System Settings</adminGroup>
      <weight>110</weight>
   </item>
+  <item>
+     <path>civicrm/admin/mapping/edit</path>
+     <title>Import/Export Mappings</title>
+     <desc>Import and Export mappings allow you to easily run the same job multiple times. This option allows you to rename or delete existing mappings.</desc>
+     <page_callback>CRM_Admin_Form_Mapping</page_callback>
+     <adminGroup>System Settings</adminGroup>
+     <weight>111</weight>
+  </item>
   <item>
      <path>civicrm/admin/setting/debug</path>
      <title>Debugging</title>
index fb1811b9b65688e8eeea9f52bedfb71e1d8ab8c4..3045914e34372c3d1829b59fb49927c966857ea2 100644 (file)
@@ -7,6 +7,11 @@
   <comment>Store field mappings in import or export for reuse</comment>
   <labelField>name</labelField>
   <title>Field Mapping</title>
+  <paths>
+    <add>civicrm/admin/mapping/edit?reset=1&amp;action=add</add>
+    <browse>civicrm/admin/mapping?reset=1</browse>
+    <update>civicrm/admin/mapping/edit?reset=1&amp;action=update&amp;id=[id]</update>
+  </paths>
   <add>1.2</add>
   <field>
     <name>id</name>