From da30a95496cfd188fa2851500c3d10ea6bcea753 Mon Sep 17 00:00:00 2001 From: colemanw Date: Fri, 2 Jun 2023 15:58:23 -0400 Subject: [PATCH] CiviGrant - Add missing html type metadata and upgrade civix --- ext/civigrant/CRM/Grant/DAO/Grant.php | 93 +++++++++++++++++++- ext/civigrant/civigrant.civix.php | 4 +- ext/civigrant/info.xml | 4 +- ext/civigrant/xml/schema/CRM/Grant/Grant.xml | 1 + 4 files changed, 97 insertions(+), 5 deletions(-) diff --git a/ext/civigrant/CRM/Grant/DAO/Grant.php b/ext/civigrant/CRM/Grant/DAO/Grant.php index a9a90d8cbf..f25269dc93 100644 --- a/ext/civigrant/CRM/Grant/DAO/Grant.php +++ b/ext/civigrant/CRM/Grant/DAO/Grant.php @@ -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' => [ diff --git a/ext/civigrant/civigrant.civix.php b/ext/civigrant/civigrant.civix.php index 2b49bd6d7a..ecde1e5197 100644 --- a/ext/civigrant/civigrant.civix.php +++ b/ext/civigrant/civigrant.civix.php @@ -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; diff --git a/ext/civigrant/info.xml b/ext/civigrant/info.xml index 895762eb6e..2f0773c368 100644 --- a/ext/civigrant/info.xml +++ b/ext/civigrant/info.xml @@ -32,11 +32,11 @@ menu-xml@1.0.0 mgd-php@1.0.0 afform-entity-php@1.0.0 - smarty-v2@1.0.0 + smarty-v2@1.0.1 entity-types-php@1.0.0 CRM/Grant - 23.02.0 + 23.02.1 diff --git a/ext/civigrant/xml/schema/CRM/Grant/Grant.xml b/ext/civigrant/xml/schema/CRM/Grant/Grant.xml index b6955d4399..e3db6baafa 100644 --- a/ext/civigrant/xml/schema/CRM/Grant/Grant.xml +++ b/ext/civigrant/xml/schema/CRM/Grant/Grant.xml @@ -238,6 +238,7 @@ FK to Financial Type. + Select 4.3 -- 2.25.1