Skip to content

Commit

Permalink
Add metadata to is_primary fields
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jan 10, 2020
1 parent 187d67c commit b6673dc
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 27 deletions.
6 changes: 3 additions & 3 deletions 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:6dabc95988fa66837c8f90b4ac68901c)
* (GenCodeChecksum:aed8175462599ecc4c8d43887d76350a)
*/

/**
Expand Down Expand Up @@ -313,7 +313,7 @@ public static function &fields() {
'is_primary' => [
'name' => 'is_primary',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Address Primary?'),
'title' => ts('Primary address'),
'description' => ts('Is this the primary address.'),
'where' => 'civicrm_address.is_primary',
'default' => '0',
Expand All @@ -322,7 +322,7 @@ public static function &fields() {
'bao' => 'CRM_Core_BAO_Address',
'localizable' => 0,
'html' => [
'type' => 'CheckBox',
'type' => 'Radio',
],
],
'is_billing' => [
Expand Down
11 changes: 7 additions & 4 deletions CRM/Core/DAO/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Email.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:68301f75314731f6ee2ec37298fe49fe)
* (GenCodeChecksum:ae76175a9d3e57bc555ce90cac672e73)
*/

/**
Expand Down Expand Up @@ -57,7 +57,7 @@ class CRM_Core_DAO_Email extends CRM_Core_DAO {
public $email;

/**
* Is this the primary?
* Is this the primary email address
*
* @var bool
*/
Expand Down Expand Up @@ -210,14 +210,17 @@ public static function &fields() {
'is_primary' => [
'name' => 'is_primary',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Primary email'),
'description' => ts('Is this the primary?'),
'title' => ts('Primary email'),
'description' => ts('Is this the primary email address'),
'where' => 'civicrm_email.is_primary',
'default' => '0',
'table_name' => 'civicrm_email',
'entity' => 'Email',
'bao' => 'CRM_Core_BAO_Email',
'localizable' => 0,
'html' => [
'type' => 'Radio',
],
],
'is_billing' => [
'name' => 'is_billing',
Expand Down
7 changes: 5 additions & 2 deletions CRM/Core/DAO/IM.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/IM.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:e09b9168fc001341138686c827deba1f)
* (GenCodeChecksum:9ea5d47a6892a28874a633ca8c5ef92c)
*/

/**
Expand Down Expand Up @@ -192,14 +192,17 @@ public static function &fields() {
'is_primary' => [
'name' => 'is_primary',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is IM Primary?'),
'title' => ts('Primary IM'),
'description' => ts('Is this the primary IM for this contact and location.'),
'where' => 'civicrm_im.is_primary',
'default' => '0',
'table_name' => 'civicrm_im',
'entity' => 'IM',
'bao' => 'CRM_Core_BAO_IM',
'localizable' => 0,
'html' => [
'type' => 'Radio',
],
],
'is_billing' => [
'name' => 'is_billing',
Expand Down
7 changes: 5 additions & 2 deletions CRM/Core/DAO/OpenID.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/OpenID.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:4ff4afe262a2f93f500559f17f096ae8)
* (GenCodeChecksum:4baa608e9caa3e118ac02d28032b8bc2)
*/

/**
Expand Down Expand Up @@ -170,14 +170,17 @@ public static function &fields() {
'is_primary' => [
'name' => 'is_primary',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is OpenID Primary?'),
'title' => ts('Primary ID'),
'description' => ts('Is this the primary email for this contact and location.'),
'where' => 'civicrm_openid.is_primary',
'default' => '0',
'table_name' => 'civicrm_openid',
'entity' => 'OpenID',
'bao' => 'CRM_Core_BAO_OpenID',
'localizable' => 0,
'html' => [
'type' => 'Radio',
],
],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
Expand Down
7 changes: 5 additions & 2 deletions CRM/Core/DAO/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Phone.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:8298e3f0ae875f23de4b0c6a737e94c6)
* (GenCodeChecksum:76a7202934e0d8aa7f4240c61a42e42c)
*/

/**
Expand Down Expand Up @@ -175,14 +175,17 @@ public static function &fields() {
'is_primary' => [
'name' => 'is_primary',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Phone Primary?'),
'title' => ts('Primary phone'),
'description' => ts('Is this the primary phone for this contact and location.'),
'where' => 'civicrm_phone.is_primary',
'default' => '0',
'table_name' => 'civicrm_phone',
'entity' => 'Phone',
'bao' => 'CRM_Core_BAO_Phone',
'localizable' => 0,
'html' => [
'type' => 'Radio',
],
],
'is_billing' => [
'name' => 'is_billing',
Expand Down
4 changes: 2 additions & 2 deletions xml/schema/Core/Address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
</index>
<field>
<name>is_primary</name>
<title>Is Address Primary?</title>
<title>Primary address</title>
<type>boolean</type>
<default>0</default>
<comment>Is this the primary address.</comment>
<add>2.0</add>
<html>
<type>CheckBox</type>
<type>Radio</type>
</html>
</field>
<index>
Expand Down
14 changes: 5 additions & 9 deletions xml/schema/Core/Email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,14 @@
</index>
<field>
<name>is_primary</name>
<title>Primary email</title>
<type>boolean</type>
<default>0</default>
<comment>Is this the primary email for this contact and location.</comment>
<comment>Is this the primary email address</comment>
<add>1.1</add>
</field>
<field>
<name>is_primary</name>
<title>Is Primary email</title>
<type>boolean</type>
<default>0</default>
<comment>Is this the primary?</comment>
<add>2.0</add>
<html>
<type>Radio</type>
</html>
</field>
<index>
<name>index_is_primary</name>
Expand Down
5 changes: 4 additions & 1 deletion xml/schema/Core/IM.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@
</index>
<field>
<name>is_primary</name>
<title>Is IM Primary?</title>
<title>Primary IM</title>
<type>boolean</type>
<default>0</default>
<html>
<type>Radio</type>
</html>
<comment>Is this the primary IM for this contact and location.</comment>
<add>1.1</add>
</field>
Expand Down
5 changes: 4 additions & 1 deletion xml/schema/Core/OpenID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@
</field>
<field>
<name>is_primary</name>
<title>Is OpenID Primary?</title>
<title>Primary ID</title>
<type>boolean</type>
<default>0</default>
<html>
<type>Radio</type>
</html>
<comment>Is this the primary email for this contact and location.</comment>
<add>2.0</add>
</field>
Expand Down
5 changes: 4 additions & 1 deletion xml/schema/Core/Phone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@
</index>
<field>
<name>is_primary</name>
<title>Is Phone Primary?</title>
<title>Primary phone</title>
<type>boolean</type>
<default>0</default>
<html>
<type>Radio</type>
</html>
<comment>Is this the primary phone for this contact and location.</comment>
<add>1.1</add>
</field>
Expand Down

0 comments on commit b6673dc

Please sign in to comment.