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

Add controlField metadata for ChainSelect fields #16164

Merged
merged 1 commit into from
Dec 30, 2019
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
1 change: 1 addition & 0 deletions CRM/Core/CodeGen/Specification.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ public function getField(&$fieldXML, &$fields) {
'type',
'formatType',
'label',
'controlField',
/* Fixme: prior to CRM-13497 these were in a flat structure
// CRM-13497 moved them to be nested within 'html' but there's no point
// making that change in the DAOs right now since we are in the process of
Expand Down
4 changes: 3 additions & 1 deletion CRM/Core/DAO/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Address.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:4e3b66ed828527539c525b2ffc71e606)
* (GenCodeChecksum:ec9f95b3b9d7cb430a52e5b367d735fc)
*/

/**
Expand Down Expand Up @@ -568,6 +568,7 @@ public static function &fields() {
'FKClassName' => 'CRM_Core_DAO_County',
'html' => [
'type' => 'ChainSelect',
'controlField' => 'state_province_id',
],
'pseudoconstant' => [
'table' => 'civicrm_county',
Expand All @@ -589,6 +590,7 @@ public static function &fields() {
'FKClassName' => 'CRM_Core_DAO_StateProvince',
'html' => [
'type' => 'ChainSelect',
'controlField' => 'country_id',
],
'pseudoconstant' => [
'table' => 'civicrm_state_province',
Expand Down
2 changes: 2 additions & 0 deletions xml/schema/Core/Address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
</pseudoconstant>
<html>
<type>ChainSelect</type>
<controlField>state_province_id</controlField>
</html>
<add>1.1</add>
</field>
Expand All @@ -285,6 +286,7 @@
<localize_context>province</localize_context>
<html>
<type>ChainSelect</type>
<controlField>country_id</controlField>
</html>
<add>1.1</add>
</field>
Expand Down