Skip to content

Commit

Permalink
Merge pull request #16164 from colemanw/controlField
Browse files Browse the repository at this point in the history
Add controlField metadata for ChainSelect fields
  • Loading branch information
seamuslee001 authored Dec 30, 2019
2 parents e356d6f + 8ada2bf commit 8830e2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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

0 comments on commit 8830e2e

Please sign in to comment.