Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-02-06-10-43-01
[civicrm-core.git] / xml / schema / Contact / Contact.xml
index 6c90dc3b9866f35b77f17413d8890a7ca17525e0..16d84cb40faa5a0fb2378e97b8dd652efcc042a3 100644 (file)
@@ -34,6 +34,9 @@
         <labelColumn>label</labelColumn>
         <condition>parent_id IS NULL</condition>
       </pseudoconstant>
+      <html>
+        <type>Select</type>
+      </html>
        <add>1.1</add>
        <change>3.1</change>
   </field>
         <labelColumn>label</labelColumn>
         <condition>parent_id IS NOT NULL</condition>
       </pseudoconstant>
+      <html>
+        <type>Multi-Select</type>
+      </html>
        <add>1.5</add>
   </field>
   <index>
        <name>index_contact_sub_type</name>
        <fieldName>contact_sub_type</fieldName>
+       <html>
+        <type>Multi-Select</type>
+      </html>
        <add>2.1</add>
   </index>
   <field>
@@ -71,6 +80,9 @@
        <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
        <dataPattern>/^\d{1,}$/</dataPattern>
        <default>0</default>
+       <html>
+         <type>CheckBox</type>
+       </html>
        <add>1.1</add>
 </field>
 <field>
@@ -81,6 +93,9 @@
        <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
        <dataPattern>/^\d{1,}$/</dataPattern>
        <add>1.1</add>
+       <html>
+         <type>CheckBox</type>
+       </html>
  </field>
  <field>
        <name>do_not_mail</name>
        <dataPattern>/^\d{1,}$/</dataPattern>
        <default>0</default>
        <add>1.1</add>
+       <html>
+         <type>CheckBox</type>
+       </html>
   </field>
   <field>
        <name>do_not_sms</name>
        <dataPattern>/^\d{1,}$/</dataPattern>
        <default>0</default>
        <add>3.0</add>
+       <html>
+         <type>CheckBox</type>
+       </html>
   </field>
   <field>
        <name>do_not_trade</name>
        <dataPattern>/^\d{1,}$/</dataPattern>
        <default>0</default>
        <add>1.1</add>
+       <html>
+         <type>CheckBox</type>
+       </html>
   </field>
   <field>
     <name>is_opt_out</name>
     <required>true</required>
     <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
     <add>1.1</add>
+    <html>
+         <type>CheckBox</type>
+       </html>
   </field>
   <field>
        <name>legal_identifier</name>
        <dataPattern>/\w+?\d{5,}/</dataPattern>
        <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.</comment>
       <add>1.1</add>
+      <html>
+        <type>Text</type>
+      </html>
   </field>
   <field>
        <name>external_identifier</name>
        <type>varchar</type>
        <length>32</length>
-       <size>EIGHT</size>
+       <html>
+         <type>Text</type>
+         <size>EIGHT</size>
+       </html>
+
        <import>true</import>
        <headerPattern>/external\s?id/i</headerPattern>
        <dataPattern>/^\d{11,}$/</dataPattern>
        <title>Sort Name</title>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
+
        <export>true</export>
        <comment>Name used for sorting different contact types</comment>
       <add>1.1</add>
        <title>Display Name</title>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
+
        <export>true</export>
        <comment>Formatted name representing preferred format for display/print/other output.</comment>
        <add>1.1</add>
        <title>Nickname</title>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
+
        <import>true</import>
        <headerPattern>/n(ick\s)name|nick$/i</headerPattern>
        <dataPattern>/^\w+$/</dataPattern>
        <name>legal_name</name>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
+
        <import>true</import>
        <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
        <comment>Legal Name.</comment>
        <title>Website</title>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
+
        <import>true</import>
        <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
        <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
        <import>true</import>
        <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
        <add>1.1</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
       <name>preferred_communication_method</name>
       <pseudoconstant>
         <optionGroupName>preferred_communication_method</optionGroupName>
       </pseudoconstant>
+      <html>
+        <type>Select</type>
+      </html>
   </field>
   <index>
        <name>index_preferred_communication_method</name>
         <optionGroupName>languages</optionGroupName>
         <keyColumn>name</keyColumn>
       </pseudoconstant>
+      <html>
+        <type>Select</type>
+      </html>
       <add>3.2</add>
   </field>
   <field>
        <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
        <comment>What is the preferred mode of sending an email.</comment>
        <add>1.1</add>
+       <html>
+         <type>Select</type>
+       </html>
   </field>
   <field>
       <name>hash</name>
        <uniqueName>contact_source</uniqueName>
        <type>varchar</type>
        <length>255</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
+
        <import>true</import>
        <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/i</headerPattern>
        <comment>where contact come from, e.g. import, donate module insert...</comment>
        <name>first_name</name>
        <type>varchar</type>
        <length>64</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
        <import>true</import>
        <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
        <dataPattern>/^\w+$/</dataPattern>
        <name>middle_name</name>
        <type>varchar</type>
        <length>64</length>
-       <size>MEDIUM</size>
+       <html>
+         <type>Text</type>
+         <size>MEDIUM</size>
+       </html>
        <import>true</import>
        <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
        <dataPattern>/^\w+$/</dataPattern>
        <name>last_name</name>
        <type>varchar</type>
        <length>64</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
        <import>true</import>
        <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
        <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
       <name>index_last_name</name>
       <fieldName>last_name</fieldName>
       <add>1.8</add>
+      <html>
+        <type>Text</type>
+      </html>
   </index>
   <field>
       <name>prefix_id</name>
       <pseudoconstant>
         <optionGroupName>individual_prefix</optionGroupName>
       </pseudoconstant>
+      <html>
+        <type>Select</type>
+      </html>
       <headerPattern>/^(prefix|title)/i</headerPattern>
       <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
       <import>true</import>
       <pseudoconstant>
         <optionGroupName>individual_suffix</optionGroupName>
       </pseudoconstant>
+      <html>
+        <type>Select</type>
+      </html>
       <import>true</import>
       <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
       <headerPattern>/^suffix$/i</headerPattern>
       <fieldName>suffix_id</fieldName>
       <add>1.6</add>
   </index>
+  <field>
+      <name>formal_title</name>
+      <type>varchar</type>
+      <length>64</length>
+      <import>true</import>
+      <headerPattern>/^title/i</headerPattern>
+      <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
+      <add>4.5</add>
+  </field>
+  <field>
+      <name>communication_style_id</name>
+      <title>Communication Style</title>
+      <type>int unsigned</type>
+      <pseudoconstant>
+        <optionGroupName>communication_style</optionGroupName>
+      </pseudoconstant>
+      <export>true</export>
+      <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
+      <add>4.4</add>
+  </field>
+  <index>
+      <name>index_communication_style_id</name>
+      <fieldName>communication_style_id</fieldName>
+      <add>4.4</add>
+  </index>
   <field>
        <name>greeting_type</name>
        <type>varchar</type>
        <export>false</export>
        <comment>Custom Email Greeting.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>email_greeting_display</name>
        <length>255</length>
        <comment>Cache Email Greeting.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>postal_greeting_id</name>
        <title>Postal Greeting ID</title>
        <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>postal_greeting_custom</name>
        <export>false</export>
        <comment>Custom Postal greeting.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>postal_greeting_display</name>
        <length>255</length>
        <comment>Cache Postal greeting.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>addressee_id</name>
        <export>false</export>
        <comment>Custom Addressee.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>addressee_display</name>
        <length>255</length>
        <comment>Cache Addressee.</comment>
        <add>3.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>job_title</name>
        <type>varchar</type>
        <length>255</length>
-       <size>MEDIUM</size>
+       <html>
+         <type>Text</type>
+         <size>MEDIUM</size>
+       </html>
        <import>true</import>
        <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
        <dataPattern>//</dataPattern>
       <pseudoconstant>
         <optionGroupName>gender</optionGroupName>
       </pseudoconstant>
+      <html>
+        <type>Select</type>
+      </html>
       <headerPattern>/^gender$/i</headerPattern>
       <comment>FK to gender ID</comment>
       <import>true</import>
      <name>UI_gender</name>
      <fieldName>gender_id</fieldName>
      <add>1.6</add>
+     <html>
+       <type>Select</type>
+     </html>
   </index>
   <field>
        <name>birth_date</name>
        <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
        <comment>Date of birth</comment>
        <add>1.1</add>
+       <html>
+         <type>Select Date</type>
+       </html>
   </field>
   <field>
        <name>is_deceased</name>
        <type>boolean</type>
        <default>0</default>
        <add>1.1</add>
+       <html>
+         <type>CheckBox</type>
+       </html>
   </field>
   <field>
        <name>deceased_date</name>
        <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
        <comment>Date of deceased</comment>
        <add>1.5</add>
+       <html>
+         <type>Select Date</type>
+       </html>
   </field>
   <field>
       <name>mail_to_household_id</name>
        <name>household_name</name>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
        <import>true</import>
        <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
        <dataPattern>/^\w+$/</dataPattern>
       <title>Household Primary Contact ID</title>
       <comment>Optional FK to Primary Contact for this household.</comment>
        <add>1.1</add>
+       <html>
+         <type>Select</type>
+       </html>
   </field>
   <foreignKey>
        <name>primary_contact_id</name>
        <name>organization_name</name>
        <type>varchar</type>
        <length>128</length>
-       <size>BIG</size>
+       <html>
+         <type>Text</type>
+         <size>BIG</size>
+       </html>
        <import>true</import>
        <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
        <dataPattern>/^\w+$/</dataPattern>
        <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
        <comment>Standard Industry Classification Code.</comment>
        <add>1.1</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
        <name>user_unique_id</name>
        <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
        <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
        <add>2.0</add>
+       <html>
+         <type>Text</type>
+       </html>
   </field>
   <field>
       <name>employer_id</name>
       <comment>OPTIONAL FK to civicrm_contact record.</comment>
       <export>true</export>
       <add>2.1</add>
+      <html>
+       <type>Autocomplete-Select</type>
+     </html>
   </field>
   <foreignKey>
        <name>employer_id</name>
     <required>true</required>
     <export>true</export>
     <add>3.2</add>
+    <html>
+      <type>CheckBox</type>
+    </html>
   </field>
   <index>
     <name>index_is_deleted</name>