From d2fa3204549f7df907882f5403bf1500ef68529c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 12 Nov 2022 15:31:19 -0500 Subject: [PATCH] CiviEvent - Add labels to field metadata --- CRM/Core/I18n/SchemaStructure.php | 4 ++++ CRM/Event/DAO/Event.php | 13 ++++++++++++- tests/phpunit/CRM/Utils/TokenConsistencyTest.php | 2 +- xml/schema/Event/Event.xml | 12 ++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CRM/Core/I18n/SchemaStructure.php b/CRM/Core/I18n/SchemaStructure.php index 3752833f5d..fc765945ed 100644 --- a/CRM/Core/I18n/SchemaStructure.php +++ b/CRM/Core/I18n/SchemaStructure.php @@ -624,14 +624,17 @@ class CRM_Core_I18n_SchemaStructure { ], 'civicrm_event' => [ 'title' => [ + 'label' => "Title", 'type' => "Text", ], 'summary' => [ + 'label' => "Summary", 'type' => "TextArea", 'rows' => "4", 'cols' => "60", ], 'description' => [ + 'label' => "Description", 'type' => "RichTextEditor", 'rows' => "8", 'cols' => "60", @@ -640,6 +643,7 @@ class CRM_Core_I18n_SchemaStructure { 'type' => "Text", ], 'event_full_text' => [ + 'label' => "Event Full Message", 'type' => "TextArea", 'rows' => "4", 'cols' => "60", diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index e6474d5415..08fa02f4f0 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Event.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:52019312abec7e5c00cc499d0c547ef0) + * (GenCodeChecksum:82ed6a487ce2639e83cada1ac876c895) */ /** @@ -740,6 +740,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Number', + 'label' => ts("ID"), ], 'readonly' => TRUE, 'add' => '1.7', @@ -761,6 +762,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 1, 'html' => [ 'type' => 'Text', + 'label' => ts("Title"), ], 'add' => '1.7', ], @@ -778,6 +780,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 1, 'html' => [ 'type' => 'TextArea', + 'label' => ts("Summary"), ], 'add' => '1.7', ], @@ -795,6 +798,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 1, 'html' => [ 'type' => 'RichTextEditor', + 'label' => ts("Description"), ], 'add' => '1.7', ], @@ -811,6 +815,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'Select', + 'label' => ts("Type"), ], 'pseudoconstant' => [ 'optionGroupName' => 'event_type', @@ -852,6 +857,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => ts("Public"), ], 'add' => '1.7', ], @@ -871,6 +877,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'html' => [ 'type' => 'Select Date', 'formatType' => 'activityDateTime', + 'label' => ts("Start Date"), ], 'add' => '1.7', ], @@ -890,6 +897,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'html' => [ 'type' => 'Select Date', 'formatType' => 'activityDateTime', + 'label' => ts("End Date"), ], 'add' => '1.7', ], @@ -907,6 +915,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => ts("Online Registration"), ], 'add' => '1.7', ], @@ -991,6 +1000,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 1, 'html' => [ 'type' => 'TextArea', + 'label' => ts("Event Full Message"), ], 'add' => '1.7', ], @@ -1008,6 +1018,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => ts("Paid Event"), ], 'add' => '1.7', ], diff --git a/tests/phpunit/CRM/Utils/TokenConsistencyTest.php b/tests/phpunit/CRM/Utils/TokenConsistencyTest.php index 9b69870e2e..0840d6cca9 100644 --- a/tests/phpunit/CRM/Utils/TokenConsistencyTest.php +++ b/tests/phpunit/CRM/Utils/TokenConsistencyTest.php @@ -903,7 +903,7 @@ United States', $tokenProcessor->getRow(0)->render('message')); '{event.title}' => 'Event Title', '{event.start_date}' => 'Event Start Date', '{event.end_date}' => 'Event End Date', - '{event.event_type_id:label}' => 'Event Type', + '{event.event_type_id:label}' => 'Type', '{event.summary}' => 'Event Summary', '{event.contact_email}' => 'Event Contact Email', '{event.contact_phone}' => 'Event Contact Phone', diff --git a/xml/schema/Event/Event.xml b/xml/schema/Event/Event.xml index 2fd1d8c9a1..c3b4bb8bd4 100644 --- a/xml/schema/Event/Event.xml +++ b/xml/schema/Event/Event.xml @@ -21,6 +21,7 @@ true Event + Number 1.7 @@ -40,6 +41,7 @@ true Event Title (e.g. Fall Fundraiser Dinner) + Text 1.7 @@ -49,6 +51,7 @@ text Event Summary + TextArea 4 60 @@ -63,6 +66,7 @@ event_description Event Description + RichTextEditor 8 60 @@ -81,6 +85,7 @@ event_type + Select Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type. @@ -120,6 +125,7 @@ Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs. 1.7 + CheckBox @@ -133,6 +139,7 @@ Date and time that event starts. 1.7 + Select Date activityDateTime @@ -147,6 +154,7 @@ Date and time that event ends. May be NULL if no defined end date/time 1.7 + Select Date activityDateTime @@ -160,6 +168,7 @@ If true, include registration link on Event Info page. 1.7 + CheckBox @@ -213,6 +222,7 @@ text Event Information + TextArea 4 60 @@ -230,6 +240,7 @@ If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration. 1.7 + CheckBox @@ -287,6 +298,7 @@ Is this Event enabled or disabled/cancelled? 1.7 + CheckBox -- 2.25.1