Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Add in frontend fields for title and description of group Schem… #18599

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ protected function assignTestValue($fieldName, &$fieldDef, $counter) {
$this->{$fieldName} = "NULL";
}
else {
parent::assignTestValues($fieldName, $fieldDef, $counter);
parent::assignTestValue($fieldName, $fieldDef, $counter);
}
}

Expand Down
57 changes: 54 additions & 3 deletions CRM/Contact/DAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Contact/Group.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:9d3fc8fbc20e3b8068d5989828341c66)
* (GenCodeChecksum:25bcea958ed3b88317a2bbb89169b0a6)
*/

/**
Expand Down Expand Up @@ -175,6 +175,20 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO {
*/
public $modified_id;

/**
* Alternative public title for this Group.
*
* @var string
*/
public $frontend_title;

/**
* Alternative public description of the group.
*
* @var text
*/
public $frontend_description;

/**
* Class constructor.
*/
Expand Down Expand Up @@ -250,8 +264,9 @@ public static function &fields() {
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Group Title'),
'description' => ts('Name of Group.'),
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'required' => TRUE,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'where' => 'civicrm_group.title',
'table_name' => 'civicrm_group',
'entity' => 'Group',
Expand Down Expand Up @@ -501,6 +516,42 @@ public static function &fields() {
'FKClassName' => 'CRM_Contact_DAO_Contact',
'add' => '4.5',
],
'frontend_title' => [
'name' => 'frontend_title',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Public Group Title'),
'description' => ts('Alternative public title for this Group.'),
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'where' => 'civicrm_group.frontend_title',
'default' => 'NULL',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
'localizable' => 1,
'html' => [
'type' => 'Text',
],
'add' => '5.31',
],
'frontend_description' => [
'name' => 'frontend_description',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Public Group Description'),
'description' => ts('Alternative public description of the group.'),
'rows' => 2,
'cols' => 60,
'where' => 'civicrm_group.frontend_description',
'default' => 'NULL',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
'localizable' => 1,
'html' => [
'type' => 'TextArea',
],
'add' => '5.31',
],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
Expand Down
13 changes: 12 additions & 1 deletion CRM/Core/I18n/SchemaStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public static function &columns() {
'description' => "text COMMENT 'Optional description.'",
],
'civicrm_group' => [
'title' => "varchar(64) COMMENT 'Name of Group.'",
'title' => "varchar(255) NOT NULL COMMENT 'Name of Group.'",
'frontend_title' => "varchar(255) DEFAULT NULL COMMENT 'Alternative public title for this Group.'",
'frontend_description' => "text DEFAULT NULL COMMENT 'Alternative public description of the group.'",
],
'civicrm_contribution_page' => [
'title' => "varchar(255) COMMENT 'Contribution Page title. For top of page display'",
Expand Down Expand Up @@ -412,6 +414,15 @@ public static function &widgets() {
'civicrm_group' => [
'title' => [
'type' => "Text",
'required' => "true",
],
'frontend_title' => [
'type' => "Text",
],
'frontend_description' => [
'type' => "TextArea",
'rows' => "2",
'cols' => "60",
],
],
'civicrm_contribution_page' => [
Expand Down
Loading