CiviGrant - Add missing html type metadata and upgrade civix
authorcolemanw <coleman@civicrm.org>
Fri, 2 Jun 2023 19:58:23 +0000 (15:58 -0400)
committercolemanw <coleman@civicrm.org>
Fri, 2 Jun 2023 19:58:23 +0000 (15:58 -0400)
ext/civigrant/CRM/Grant/DAO/Grant.php
ext/civigrant/civigrant.civix.php
ext/civigrant/info.xml
ext/civigrant/xml/schema/CRM/Grant/Grant.xml

index a9a90d8cbfae25fa90a5d3b23337f9625d27eb8f..f25269dc930d9f89ec32c69a1c990a9482026355 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from civigrant/xml/schema/CRM/Grant/Grant.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bd866aa053f6871792fdecfc4aa3c92a)
+ * (GenCodeChecksum:c3ae6f29f7956693f952034cb68e75a0)
  */
 use CRM_Grant_ExtensionUtil as E;
 
@@ -242,6 +242,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'title' => E::ts('Grant ID'),
           'description' => E::ts('Unique Grant id'),
           'required' => TRUE,
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.id',
           'export' => TRUE,
@@ -261,6 +267,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'title' => E::ts('Contact ID'),
           'description' => E::ts('Contact ID of contact record given grant belongs to.'),
           'required' => TRUE,
+          'usage' => [
+            'import' => FALSE,
+            'export' => TRUE,
+            'duplicate_matching' => FALSE,
+            'token' => FALSE,
+          ],
           'where' => 'civicrm_grant.contact_id',
           'export' => TRUE,
           'table_name' => 'civicrm_grant',
@@ -279,6 +291,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_DATE,
           'title' => E::ts('Application received date'),
           'description' => E::ts('Date on which grant application was received by donor.'),
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.application_received_date',
           'export' => TRUE,
@@ -297,6 +315,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_DATE,
           'title' => E::ts('Decision date'),
           'description' => E::ts('Date on which grant decision was made.'),
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.decision_date',
           'export' => TRUE,
@@ -315,6 +339,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_DATE,
           'title' => E::ts('Grant Money transfer date'),
           'description' => E::ts('Date on which grant money transfer was made.'),
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.money_transfer_date',
           'export' => TRUE,
@@ -333,6 +363,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_DATE,
           'title' => E::ts('Grant Report Due Date'),
           'description' => E::ts('Date on which grant report is due.'),
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.grant_due_date',
           'export' => TRUE,
@@ -351,6 +387,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => E::ts('Grant report received'),
           'description' => E::ts('Yes/No field stating whether grant report was received by donor.'),
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.grant_report_received',
           'export' => TRUE,
@@ -369,6 +411,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'title' => E::ts('Grant Type'),
           'description' => E::ts('Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.'),
           'required' => TRUE,
+          'usage' => [
+            'import' => FALSE,
+            'export' => TRUE,
+            'duplicate_matching' => FALSE,
+            'token' => FALSE,
+          ],
           'where' => 'civicrm_grant.grant_type_id',
           'export' => TRUE,
           'table_name' => 'civicrm_grant',
@@ -394,6 +442,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
             20,
             2,
           ],
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.amount_total',
           'dataPattern' => '/^\d+(\.\d{2})?$/',
@@ -416,6 +470,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
             20,
             2,
           ],
+          'usage' => [
+            'import' => FALSE,
+            'export' => FALSE,
+            'duplicate_matching' => FALSE,
+            'token' => FALSE,
+          ],
           'where' => 'civicrm_grant.amount_requested',
           'dataPattern' => '/^\d+(\.\d{2})?$/',
           'table_name' => 'civicrm_grant',
@@ -436,6 +496,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
             20,
             2,
           ],
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.amount_granted',
           'dataPattern' => '/^\d+(\.\d{2})?$/',
@@ -457,6 +523,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'required' => TRUE,
           'maxlength' => 3,
           'size' => CRM_Utils_Type::FOUR,
+          'usage' => [
+            'import' => FALSE,
+            'export' => FALSE,
+            'duplicate_matching' => FALSE,
+            'token' => FALSE,
+          ],
           'where' => 'civicrm_grant.currency',
           'table_name' => 'civicrm_grant',
           'entity' => 'Grant',
@@ -481,6 +553,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'description' => E::ts('Grant rationale.'),
           'rows' => 4,
           'cols' => 60,
+          'usage' => [
+            'import' => TRUE,
+            'export' => TRUE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.rationale',
           'export' => TRUE,
@@ -499,6 +577,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'title' => E::ts('Grant Status'),
           'description' => E::ts('ID of Grant status.'),
           'required' => TRUE,
+          'usage' => [
+            'import' => TRUE,
+            'export' => FALSE,
+            'duplicate_matching' => TRUE,
+            'token' => FALSE,
+          ],
           'import' => TRUE,
           'where' => 'civicrm_grant.status_id',
           'export' => FALSE,
@@ -520,6 +604,12 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => E::ts('Financial Type ID'),
           'description' => E::ts('FK to Financial Type.'),
+          'usage' => [
+            'import' => FALSE,
+            'export' => FALSE,
+            'duplicate_matching' => FALSE,
+            'token' => FALSE,
+          ],
           'where' => 'civicrm_grant.financial_type_id',
           'default' => NULL,
           'table_name' => 'civicrm_grant',
@@ -528,6 +618,7 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
           'localizable' => 0,
           'FKClassName' => 'CRM_Financial_DAO_FinancialType',
           'html' => [
+            'type' => 'Select',
             'label' => E::ts("Financial Type"),
           ],
           'pseudoconstant' => [
index 2b49bd6d7a27a118f5a7bdd42e521a2b2640b52e..ecde1e5197aa422852380716a63d6a192989368e 100644 (file)
@@ -133,8 +133,8 @@ function _civigrant_civix_insert_navigation_menu(&$menu, $path, $item) {
   if (empty($path)) {
     $menu[] = [
       'attributes' => array_merge([
-        'label'      => CRM_Utils_Array::value('name', $item),
-        'active'     => 1,
+        'label' => $item['name'] ?? NULL,
+        'active' => 1,
       ], $item),
     ];
     return TRUE;
index 895762eb6ed339372abe542634cdf81df62916d7..2f0773c368178115d7836f86dc6b8cf2e604e27c 100644 (file)
     <mixin>menu-xml@1.0.0</mixin>
     <mixin>mgd-php@1.0.0</mixin>
     <mixin>afform-entity-php@1.0.0</mixin>
-    <mixin>smarty-v2@1.0.0</mixin>
+    <mixin>smarty-v2@1.0.1</mixin>
     <mixin>entity-types-php@1.0.0</mixin>
   </mixins>
   <civix>
     <namespace>CRM/Grant</namespace>
-    <format>23.02.0</format>
+    <format>23.02.1</format>
   </civix>
 </extension>
index b6955d43990459fea132a49914b53ca749dbd094..e3db6baafa184ab51789464f50d795395b83dbe9 100644 (file)
     <comment>FK to Financial Type.</comment>
     <html>
       <label>Financial Type</label>
+      <type>Select</type>
     </html>
     <add>4.3</add>
   </field>