Enhance metadata for OptionGroups
authorAidan Saunders <aidan.saunders@squiffle.uk>
Fri, 16 Dec 2022 09:46:01 +0000 (09:46 +0000)
committerAidan Saunders <aidan.saunders@squiffle.uk>
Thu, 12 Jan 2023 18:55:24 +0000 (18:55 +0000)
Extracted from https://github.com/civicrm/civicrm-core/pull/25180

CRM/Core/DAO/OptionGroup.php
xml/schema/Core/OptionGroup.xml

index 0b6a0d2de758315c7e174a370b020e49245fbbfc..9f909157efc1c1d09e2bc0c89509d65c6b05340f 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Core/OptionGroup.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6d1ca6dc8aa693e7b26bb19b731b0b55)
+ * (GenCodeChecksum:1d5fad72032ebfdfdce93a4b29f97542)
  */
 
 /**
@@ -174,12 +174,15 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
           'entity' => 'OptionGroup',
           'bao' => 'CRM_Core_BAO_OptionGroup',
           'localizable' => 0,
+          'html' => [
+            'type' => 'Text',
+          ],
           'add' => '1.5',
         ],
         'title' => [
           'name' => 'title',
           'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Option Group title'),
+          'title' => ts('Option Group Title'),
           'description' => ts('Option Group title.'),
           'maxlength' => 255,
           'size' => CRM_Utils_Type::HUGE,
@@ -188,6 +191,9 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
           'entity' => 'OptionGroup',
           'bao' => 'CRM_Core_BAO_OptionGroup',
           'localizable' => 1,
+          'html' => [
+            'type' => 'Text',
+          ],
           'add' => '1.5',
         ],
         'description' => [
@@ -200,6 +206,9 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
           'entity' => 'OptionGroup',
           'bao' => 'CRM_Core_BAO_OptionGroup',
           'localizable' => 1,
+          'html' => [
+            'type' => 'Text',
+          ],
           'add' => '1.5',
         ],
         'data_type' => [
@@ -222,7 +231,7 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
         'is_reserved' => [
           'name' => 'is_reserved',
           'type' => CRM_Utils_Type::T_BOOLEAN,
-          'title' => ts('Option Group Is Reserved?'),
+          'title' => ts('Option Group Is Reserved'),
           'description' => ts('Is this a predefined system option group (i.e. it can not be deleted)?'),
           'required' => TRUE,
           'where' => 'civicrm_option_group.is_reserved',
@@ -231,12 +240,16 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
           'entity' => 'OptionGroup',
           'bao' => 'CRM_Core_BAO_OptionGroup',
           'localizable' => 0,
+          'html' => [
+            'type' => 'CheckBox',
+            'label' => ts("Reserved"),
+          ],
           'add' => '1.5',
         ],
         'is_active' => [
           'name' => 'is_active',
           'type' => CRM_Utils_Type::T_BOOLEAN,
-          'title' => ts('Option Group Is Active?'),
+          'title' => ts('Enabled'),
           'description' => ts('Is this option group active?'),
           'required' => TRUE,
           'where' => 'civicrm_option_group.is_active',
@@ -263,6 +276,10 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
           'entity' => 'OptionGroup',
           'bao' => 'CRM_Core_BAO_OptionGroup',
           'localizable' => 0,
+          'html' => [
+            'type' => 'CheckBox',
+            'label' => ts("Locked"),
+          ],
           'add' => '4.5',
         ],
         'option_value_fields' => [
index f4e3f6203127a85dab48041ac1ebd7c39219f608..25469867cbd098ab3360cdf0511252758341d30d 100644 (file)
     <required>true</required>
     <comment>Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.</comment>
     <add>1.5</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
     <name>title</name>
-    <title>Option Group title</title>
+    <title>Option Group Title</title>
     <type>varchar</type>
     <length>255</length>
     <localizable>true</localizable>
     <comment>Option Group title.</comment>
     <add>1.5</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
     <name>description</name>
@@ -46,6 +52,9 @@
     <localizable>true</localizable>
     <comment>Option group description.</comment>
     <add>1.5</add>
+    <html>
+      <type>Text</type>
+    </html>
   </field>
   <field>
     <name>data_type</name>
   </field>
   <field>
     <name>is_reserved</name>
-    <title>Option Group Is Reserved?</title>
+    <title>Option Group Is Reserved</title>
     <type>boolean</type>
     <default>1</default>
     <required>true</required>
     <comment>Is this a predefined system option group (i.e. it can not be deleted)?</comment>
     <add>1.5</add>
+    <html>
+      <type>CheckBox</type>
+      <label>Reserved</label>
+    </html>
   </field>
   <field>
     <name>is_active</name>
-    <title>Option Group Is Active?</title>
+    <title>Enabled</title>
     <type>boolean</type>
     <default>1</default>
     <required>true</required>
     <required>true</required>
     <comment>A lock to remove the ability to add new options via the UI.</comment>
     <add>4.5</add>
+    <html>
+      <type>CheckBox</type>
+      <label>Locked</label>
+    </html>
   </field>
   <field>
     <name>option_value_fields</name>