Created
January 16, 2016 01:55
-
-
Save colemanw/577dfbca79fab34f312b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php | |
index 86c211a..a6f417b 100644 | |
--- a/CRM/Core/CodeGen/Specification.php | |
+++ b/CRM/Core/CodeGen/Specification.php | |
@@ -416,6 +416,8 @@ class CRM_Core_CodeGen_Specification { | |
'callback', | |
// Path to options edit form | |
'optionEditPath', | |
+ // A simple list of options. I miss enum fields... | |
+ 'options', | |
); | |
foreach ($validOptions as $pseudoOption) { | |
if (!empty($fieldXML->pseudoconstant->$pseudoOption)) { | |
diff --git a/xml/schema/Core/Note.xml b/xml/schema/Core/Note.xml | |
index 128da77..1199fb7 100644 | |
--- a/xml/schema/Core/Note.xml | |
+++ b/xml/schema/Core/Note.xml | |
@@ -26,6 +26,14 @@ | |
<length>64</length> | |
<required>true</required> | |
<comment>Name of table where item being referenced is stored.</comment> | |
+ <pseudoconstant> | |
+ <options> | |
+ <option key="civicrm_relationship">Relationship</option> | |
+ <option>civicrm_contact</option> | |
+ <option>civicrm_participant</option> | |
+ <option>civicrm_contribution</option> | |
+ </options> | |
+ </pseudoconstant> | |
<add>1.1</add> | |
</field> | |
<field> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that options could be key=>value pairs, or if no key is specified then the value would be used as a key.
Obviously there's more code to write to make that all happen...