Skip to content

Commit

Permalink
Merge pull request #14494 from colemanw/customPc
Browse files Browse the repository at this point in the history
Add a couple customField pseudoconstants
  • Loading branch information
eileenmcnaughton authored Jun 12, 2019
2 parents 1a6e317 + 72c65bf commit 5e6d2d1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions CRM/Core/DAO/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/CustomField.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:58323f46f5ac021f96591e075b37cca6)
* (GenCodeChecksum:bd9573e2a92ef325a5bbaa1a47f28da7)
*/

/**
Expand Down Expand Up @@ -197,14 +197,14 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO {
public $time_format;

/**
* Number of columns in Note Field
* Number of columns in Note Field
*
* @var int
*/
public $note_columns;

/**
* Number of rows in Note Field
* Number of rows in Note Field
*
* @var int
*/
Expand Down Expand Up @@ -570,6 +570,9 @@ public static function &fields() {
'entity' => 'CustomField',
'bao' => 'CRM_Core_BAO_CustomField',
'localizable' => 0,
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats',
],
],
'time_format' => [
'name' => 'time_format',
Expand All @@ -581,6 +584,9 @@ public static function &fields() {
'entity' => 'CustomField',
'bao' => 'CRM_Core_BAO_CustomField',
'localizable' => 0,
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::getTimeFormats',
],
],
'note_columns' => [
'name' => 'note_columns',
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function testCustomFieldRelativeDates() {
'weight' => 4,
'is_required' => 1,
'is_searchable' => 1,
'date_format' => 'mm/dd/yyyy',
'date_format' => 'mm/dd/yy',
'is_active' => 1,
);
$customField = $this->callAPIAndDocument('custom_field', 'create', $params, __FUNCTION__, __FILE__);
Expand Down
10 changes: 8 additions & 2 deletions xml/schema/Core/CustomField.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,26 +226,32 @@
<length>64</length>
<comment>date format for custom date</comment>
<add>3.1</add>
<pseudoconstant>
<callback>CRM_Core_SelectValues::getDatePluginInputFormats</callback>
</pseudoconstant>
</field>
<field>
<name>time_format</name>
<type>int unsigned</type>
<title>Field Time Format</title>
<comment>time format for custom date</comment>
<add>3.1</add>
<pseudoconstant>
<callback>CRM_Core_SelectValues::getTimeFormats</callback>
</pseudoconstant>
</field>
<field>
<name>note_columns</name>
<type>int unsigned</type>
<title>Field Note Columns</title>
<comment> Number of columns in Note Field </comment>
<comment>Number of columns in Note Field</comment>
<add>1.4</add>
</field>
<field>
<name>note_rows</name>
<type>int unsigned</type>
<title>Field Note Rows</title>
<comment> Number of rows in Note Field </comment>
<comment>Number of rows in Note Field</comment>
<add>1.4</add>
</field>
<field>
Expand Down

0 comments on commit 5e6d2d1

Please sign in to comment.