CRM-14078 - More consistent contact field labels
authorColeman Watts <coleman@civicrm.org>
Thu, 30 Jul 2015 19:28:50 +0000 (15:28 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 4 Aug 2015 01:55:39 +0000 (21:55 -0400)
21 files changed:
CRM/Activity/Import/Parser/Activity.php
CRM/Campaign/BAO/Query.php
CRM/Contact/Form/Edit/Address.php
CRM/Contact/Form/Search/Criteria.php
CRM/Contribute/Import/Parser/Contribution.php
CRM/Event/Import/Parser/Participant.php
CRM/Member/Import/Parser/Membership.php
api/v3/examples/Contact/GetFieldsOptions.php
api/v3/examples/Mailing/GetTokens.php
templates/CRM/Contact/Form/Contact.hlp
templates/CRM/Contact/Form/Contact.tpl
templates/CRM/Contact/Form/Edit/Address/city_postal_code.tpl
templates/CRM/Contact/Page/View/Summary.tpl
templates/CRM/Custom/Import/Form/DataSource.hlp
templates/CRM/common/contactFooter.tpl
templates/CRM/common/navigation.js.tpl
tests/phpunit/WebTest/Contact/MergeContactsTest.php
tests/phpunit/WebTest/Contact/SearchBuilderTest.php
xml/schema/Contact/Contact.xml
xml/schema/Core/Address.xml
xml/templates/civicrm_data.tpl

index 778d0b322eda3f75f833f2657432431efdff4af0..fdbcd75240f141c099d4d63e50155d5969deb488 100644 (file)
@@ -373,14 +373,14 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser {
         if (!empty($params['target_contact_id']) &&
           $params['target_contact_id'] != $targetContactId
         ) {
-          array_unshift($values, 'Mismatch of External identifier :' . $params['external_identifier'] . ' and Contact Id:' . $params['target_contact_id']);
+          array_unshift($values, 'Mismatch of External ID:' . $params['external_identifier'] . ' and Contact Id:' . $params['target_contact_id']);
           return CRM_Import_Parser::ERROR;
         }
         elseif ($targetContactId) {
           $params['target_contact_id'] = $targetContactId;
         }
         else {
-          array_unshift($values, 'No Matching Contact for External identifier :' . $params['external_identifier']);
+          array_unshift($values, 'No Matching Contact for External ID:' . $params['external_identifier']);
           return CRM_Import_Parser::ERROR;
         }
       }
index a6e7b2f090302fae6decf8cf64b146f3fdd6af56..390be8d5c75f47af0d7aae2667784f32f3a51870 100755 (executable)
@@ -354,7 +354,7 @@ civicrm_activity_assignment.record_type_id = $assigneeID ) ";
     $form->add('text', 'street_unit', ts('Street Unit'), $attributes['street_unit']);
     $form->add('text', 'street_address', ts('Street Address'), $attributes['street_address']);
     $form->add('text', 'city', ts('City'), $attributes['city']);
-    $form->add('text', 'postal_code', ts('Zip / Postal Code'), $attributes['postal_code']);
+    $form->add('text', 'postal_code', ts('Postal Code'), $attributes['postal_code']);
 
     //@todo FIXME - using the CRM_Core_DAO::VALUE_SEPARATOR creates invalid html - if you can find the form
     // this is loaded onto then replace with something like '__' & test
index b6cdd6b7f938157bda5aac3d89b17d4df3d3a15e..35d2ed39c0155828d305148dab4fadf836d627b0 100644 (file)
@@ -142,7 +142,13 @@ class CRM_Contact_Form_Edit_Address {
         $name = 'name';
       }
 
-      $form->addField("address[$blockId][$name]", array('entity' => 'address'));
+      $params = array('entity' => 'address');
+
+      if ($name == 'postal_code_suffix') {
+        $params['label'] = ts('Suffix');
+      }
+
+      $form->addField("address[$blockId][$name]", $params);
     }
 
     $entityId = NULL;
index 593e98e785ae59f8befaf5373450835094a67efd..a73122e0828cdbe2998a7d631038b85925728bcf 100644 (file)
@@ -270,7 +270,7 @@ class CRM_Contact_Form_Search_Criteria {
     $form->addSelect('preferred_language', array('class' => 'twenty', 'context' => 'search'));
 
     // Phone search
-    $form->addElement('text', 'phone_numeric', ts('Phone Number'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'));
+    $form->addElement('text', 'phone_numeric', ts('Phone'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'));
     $locationType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
     $phoneType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
     $form->add('select', 'phone_location_type_id', ts('Phone Location'), array('' => ts('- any -')) + $locationType, FALSE, array('class' => 'crm-select2'));
@@ -302,7 +302,7 @@ class CRM_Contact_Form_Search_Criteria {
     $elements = array(
       'street_address' => array(ts('Street Address'), $attributes['street_address'], NULL, NULL),
       'city' => array(ts('City'), $attributes['city'], NULL, NULL),
-      'postal_code' => array(ts('Zip / Postal Code'), $attributes['postal_code'], NULL, NULL),
+      'postal_code' => array(ts('Postal Code'), $attributes['postal_code'], NULL, NULL),
       'country' => array(ts('Country'), $attributes['country_id'], 'country', FALSE),
       'state_province' => array(ts('State/Province'), $attributes['state_province_id'], 'stateProvince', TRUE),
       'county' => array(ts('County'), $attributes['county_id'], 'county', TRUE),
index ea4f96640adccf53b317aa374895f09c70f9507b..42514f6f613cfc9a4ec09dfc256833bb4c664564 100644 (file)
@@ -540,7 +540,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa
         $checkCid->external_identifier = $paramValues['external_identifier'];
         $checkCid->find(TRUE);
         if ($checkCid->id != $formatted['contact_id']) {
-          array_unshift($values, 'Mismatch of External identifier :' . $paramValues['external_identifier'] . ' and Contact Id:' . $formatted['contact_id']);
+          array_unshift($values, 'Mismatch of External ID:' . $paramValues['external_identifier'] . ' and Contact Id:' . $formatted['contact_id']);
           return CRM_Import_Parser::ERROR;
         }
       }
index 8d72d37ddce8d3c409b04e3dfee549b2ea258e7c..02fdeb1bde8bded0c7d8af0118cf3b25060c2913 100644 (file)
@@ -453,7 +453,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
         $checkCid->external_identifier = $formatValues['external_identifier'];
         $checkCid->find(TRUE);
         if ($checkCid->id != $formatted['contact_id']) {
-          array_unshift($values, 'Mismatch of External identifier :' . $formatValues['external_identifier'] . ' and Contact Id:' . $formatted['contact_id']);
+          array_unshift($values, 'Mismatch of External ID:' . $formatValues['external_identifier'] . ' and Contact Id:' . $formatted['contact_id']);
           return CRM_Import_Parser::ERROR;
         }
       }
index 303d7800e31f84a378043bee48d6d39c762cda9e..7a69be4cbdfda24b82a06b7fa786cc2a411977c2 100644 (file)
@@ -516,7 +516,7 @@ class CRM_Member_Import_Parser_Membership extends CRM_Member_Import_Parser {
           $checkCid->external_identifier = $formatValues['external_identifier'];
           $checkCid->find(TRUE);
           if ($checkCid->id != $formatted['contact_id']) {
-            array_unshift($values, 'Mismatch of External identifier :' . $formatValues['external_identifier'] . ' and Contact Id:' . $formatted['contact_id']);
+            array_unshift($values, 'Mismatch of External ID:' . $formatValues['external_identifier'] . ' and Contact Id:' . $formatted['contact_id']);
             return CRM_Import_Parser::ERROR;
           }
         }
index d45717fe3711f9fbcfb90576138a6b77c2df4229..61aa1b8bb0ad56b99ea0899b1e242b79ba91a7f8 100644 (file)
@@ -689,7 +689,7 @@ function contact_getfields_expectedresult() {
       'source' => array(
         'name' => 'source',
         'type' => 2,
-        'title' => 'Source of Contact Data',
+        'title' => 'Contact Source',
         'maxlength' => 255,
         'size' => 30,
         'import' => TRUE,
index 8e100bedf1cc9e5e7a3926934c8a452fee599646..6ef6552673d7dbceea4a27d88a6941a95c722336 100644 (file)
@@ -79,7 +79,7 @@ function mailing_gettokens_expectedresult() {
       '{contact.preferred_language}' => 'Preferred Language',
       '{contact.preferred_mail_format}' => 'Preferred Mail Format',
       '{contact.hash}' => 'Contact Hash',
-      '{contact.contact_source}' => 'Source of Contact Data',
+      '{contact.contact_source}' => 'Contact Source',
       '{contact.first_name}' => 'First Name',
       '{contact.middle_name}' => 'Middle Name',
       '{contact.last_name}' => 'Last Name',
index 36a9de2b355aa1a7c42ca9bb33f4634f5207993d..7900a804289364f1f47614d30e5423b906397b14 100644 (file)
 {/htxt}
 
 {htxt id="id-internal-id-title"}
-  {ts}CiviCRM ID{/ts}
+  {ts}Contact ID{/ts}
 {/htxt}
 {htxt id="id-internal-id"}
 <p>{ts}Every contact in CiviCRM has a unique ID number. This number will never change and is the most accurate way of identifying a contact.{/ts}</p>
index aa4eebce9090c032dca8564b209c9cb45a5abb04..af546cae236d5f6ae6d933169065b86aa4fffc23 100644 (file)
@@ -63,7 +63,7 @@
               </td>
               {if $contactId}
                 <td>
-                  <label for="internal_identifier_display">{ts}CiviCRM ID{/ts} {help id="id-internal-id"}</label><br />
+                  <label for="internal_identifier_display">{ts}Contact ID{/ts} {help id="id-internal-id"}</label><br />
                   <input id="internal_identifier_display" type="text" class="crm-form-text six" size="6" readonly="readonly" value="{$contactId}">
                 </td>
               {/if}
index d30647c8556f7c889d6c1692083e3773730e74e9..50aad025b7bb88b6c186c4750d1e6b794d4e9c69 100644 (file)
     {if !empty($form.address.$blockId.postal_code)}
        <td>
           {$form.address.$blockId.postal_code.label}<br />
-          {$form.address.$blockId.postal_code.html}&nbsp;&nbsp;
-          {if !empty($form.address.$blockId.postal_code_suffix)}
+          {$form.address.$blockId.postal_code.html}
+       </td>
+      {if !empty($form.address.$blockId.postal_code_suffix)}
           <td>
-            {$form.address.$blockId.postal_code_suffix.label}<br/>
-            {$form.address.$blockId.postal_code_suffix.html} {help id="id-postal-code-suffix" file="CRM/Contact/Form/Contact.hlp"}
+            {$form.address.$blockId.postal_code_suffix.label} {help id="id-postal-code-suffix" file="CRM/Contact/Form/Contact.hlp"}<br/>
+            {$form.address.$blockId.postal_code_suffix.html}
           <td>
-          {/if}
-       </td>
+      {/if}
     {/if}
     <td colspan="2">&nbsp;&nbsp;</td>
 </tr>
index 255403d894a2cbee51a8030de3467641be17bfd3..587cef2926e0678a5fa3aea77e7200e93f2eb5ab 100644 (file)
                     </div>
                     <div class="crm-summary-row">
                       <div class="crm-label">
-                        {ts}CiviCRM ID{/ts}{if !empty($userRecordUrl)} / {ts}User ID{/ts}{/if}
+                        {ts}Contact ID{/ts}{if !empty($userRecordUrl)} / {ts}User ID{/ts}{/if}
                       </div>
                       <div class="crm-content">
                         <span class="crm-contact-contact_id">{$contactId}</span>
index 3a4bf9d472afd437ad6cba79b3bf13da753480fe..e8b7fb9fdf222a5065bef0861b34a3c3a48ba496 100644 (file)
@@ -27,6 +27,6 @@
   {ts}Importing Multi-value Custom Data{/ts}
 {/htxt}
 {htxt id="upload"}
-  {ts}The import file should contain a row for each set of custom data fields. For example, if you are importing employment history for a group of contacts, each row might contain columns for Employer, Start Date, End Date, and Position. You will also need a column containing the CiviCRM Internal Contact ID which is used to match each row to the corresponding (existing) CiviCRM contact record. NOTE: Contact IDs are included by default when exporting contacts from CiviCRM.{/ts}
+  {ts}The import file should contain a row for each set of custom data fields. For example, if you are importing employment history for a group of contacts, each row might contain columns for Employer, Start Date, End Date, and Position. You will also need a column containing the CiviCRM Contact ID which is used to match each row to the corresponding (existing) CiviCRM contact record. NOTE: Contact IDs are included by default when exporting contacts from CiviCRM.{/ts}
 {/htxt}
 
index 402f128dc591362f08401bee14557def18c2e1c5..2873c8718a5e3cca44e4fce42ed4591639051253 100644 (file)
@@ -28,7 +28,7 @@
 <div class="crm-footer" id="crm-record-log">
   <span class="col1">
     {if !empty($external_identifier)}{ts}External ID{/ts}:&nbsp;{$external_identifier}{/if}
-    {if $action NEQ 2}&nbsp; &nbsp;{ts}CiviCRM ID{/ts}:&nbsp;{$contactId}{/if}
+    {if $action NEQ 2}&nbsp; &nbsp;{ts}Contact ID{/ts}:&nbsp;{$contactId}{/if}
   </span>
   {if !empty($lastModified)}
     {ts}Last Change by{/ts}: <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$lastModified.id`"}">{$lastModified.name}</a> ({$lastModified.date|crmDate}) &nbsp;
index b8f1eb559240790d4ad4573c713a449c2274bf76..11c6a97df12c6dd402b58183255daffb45102809 100644 (file)
@@ -38,7 +38,7 @@
         </form>
         <ul>
           <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" checked="checked" value="" name="quickSearchField">{ts}Name/Email{/ts}</label></li>
-          <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="contact_id" name="quickSearchField">{ts}CiviCRM ID{/ts}</label></li>
+          <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="contact_id" name="quickSearchField">{ts}Contact ID{/ts}</label></li>
           <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="external_identifier" name="quickSearchField">{ts}External ID{/ts}</label></li>
           <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="first_name" name="quickSearchField">{ts}First Name{/ts}</label></li>
           <li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="last_name" name="quickSearchField">{ts}Last Name{/ts}</label></li>
index 2886aa5e3fd76949d49be3537549ec527ab70d37..b021a90b84313ac7c93b8884303682dc7b4b7396 100644 (file)
@@ -704,7 +704,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
       $this->click("_qf_Contact_upload_view-bottom");
       $this->waitForPageToLoad($this->getTimeoutMsec());
       $this->waitForText('crm-notification-container', "Contact Saved");
-      $mainId = explode("CiviCRM ID:", trim($this->getText("xpath=//div[@id='crm-record-log']/span[@class='col1']")));
+      $mainId = explode("Contact ID:", trim($this->getText("xpath=//div[@id='crm-record-log']/span[@class='col1']")));
       $mainId = trim($mainId[1]);
 
       //Duplicate of above contact.
@@ -724,7 +724,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
       $this->click("_qf_Contact_upload_duplicate");
       $this->waitForPageToLoad($this->getTimeoutMsec());
       $this->waitForText('crm-notification-container', "Contact Saved");
-      $duplicateId = explode("CiviCRM ID:", trim($this->getText("xpath=//div[@id='crm-record-log']/span[@class='col1']")));
+      $duplicateId = explode("Contact ID:", trim($this->getText("xpath=//div[@id='crm-record-log']/span[@class='col1']")));
       $duplicateId = trim($duplicateId[1]);
 
       return array(
index 463d9bb66286fba03b7688c71c6eaa2a40d2130f..f158861a507a242a293ef043da4f34cf8c84a900 100644 (file)
@@ -68,7 +68,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $sortName = "adv$firstName, $firstName";
     $displayName = "$firstName adv$firstName";
 
-    $this->_searchBuilder("Zip / Postal Code", "100[0-9]", $sortName, "RLIKE");
+    $this->_searchBuilder("Postal Code", "100[0-9]", $sortName, "RLIKE");
   }
 
   /**
@@ -198,7 +198,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->_createContact('Household', $firstName7, "$firstName7@advsearch.co.in", NULL, $postalCode);
 
     // check if the resultset of search builder and advanced search match for the postal code
-    $this->_searchBuilder('Zip / Postal Code', $postalCode, NULL, 'LIKE', '4');
+    $this->_searchBuilder('Postal Code', $postalCode, NULL, 'LIKE', '4');
     $this->_advancedSearch($postalCode, NULL, NULL, '4', 'postal_code');
 
     $firstName8 = "abcc" . substr(sha1(rand()), 0, 7);
index 9383bfb9f84d872e15a6e8c91eebfddbdaee9eb2..89b7733c2f79649cde8d99b18d26cfb2c94382a7 100644 (file)
@@ -10,7 +10,7 @@
   <field>
     <name>id</name>
     <type>int unsigned</type>
-    <title>Internal Contact ID</title>
+    <title>Contact ID</title>
     <import>true</import>
     <headerPattern>/internal|contact?|id$/i</headerPattern>
     <required>true</required>
   </index>
   <field>
     <name>source</name>
-    <title>Source of Contact Data</title>
+    <title>Contact Source</title>
     <uniqueName>contact_source</uniqueName>
     <type>varchar</type>
     <length>255</length>
     </html>
 
     <import>true</import>
-    <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/i</headerPattern>
+    <headerPattern>/(C(ontact\s)?Source)$/i</headerPattern>
     <comment>where contact come from, e.g. import, donate module insert...</comment>
     <add>1.1</add>
   </field>
index d23de1c1553cac94ce534b22156276c53295f51c..6585bc4e91d2fb84ca1f9cdb4f5e865659f43ccc 100644 (file)
   </foreignKey>
   <field>
     <name>postal_code_suffix</name>
-    <title>Zip / Postal Code Suffix</title>
+    <title>Postal Code Suffix</title>
     <type>varchar</type>
     <length>12</length>
     <import>true</import>
     <add>1.1</add>
     <html>
       <type>Text</type>
+      <size>3</size>
     </html>
   </field>
   <field>
     <name>postal_code</name>
-    <title>Zip / Postal Code</title>
+    <title>Postal Code</title>
     <type>varchar</type>
     <length>12</length>
     <import>true</import>
     <headerPattern>/postal|zip/i</headerPattern>
     <dataPattern>/\d?\d{4}(-\d{4})?/</dataPattern>
-    <comment>Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate
-      validation.
-    </comment>
+    <comment>Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.</comment>
     <add>1.1</add>
     <html>
       <type>Text</type>
+      <size>6</size>
     </html>
   </field>
   <field>
index c4267b2d8a4dc5fddab299e16a1a549fc3d4e4f9..7be89816a38b0d3ee05046ec94796c830138af8e 100644 (file)
@@ -546,7 +546,7 @@ VALUES
   (@option_group_id_adOpt, '{ts escape="sql"}Supplemental Address 1{/ts}'  ,  2, 'supplemental_address_1', NULL, 0, NULL,  2, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_adOpt, '{ts escape="sql"}Supplemental Address 2{/ts}'  ,  3, 'supplemental_address_2', NULL, 0, NULL,  3, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_adOpt, '{ts escape="sql"}City{/ts}'              ,  4, 'city'          , NULL, 0, NULL,  4, NULL, 0, 0, 1, NULL, NULL),
-  (@option_group_id_adOpt, '{ts escape="sql"}Zip / Postal Code{/ts}' ,  5, 'postal_code'   , NULL, 0, NULL,  5, NULL, 0, 0, 1, NULL, NULL),
+  (@option_group_id_adOpt, '{ts escape="sql"}Postal Code{/ts}' ,  5, 'postal_code'   , NULL, 0, NULL,  5, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_adOpt, '{ts escape="sql"}Postal Code Suffix{/ts}',  6, 'postal_code_suffix', NULL, 0, NULL,  6, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_adOpt, '{ts escape="sql"}County{/ts}'            ,  7, 'county'        , NULL, 0, NULL,  7, NULL, 0, 0, 1, NULL, NULL),
   (@option_group_id_adOpt, '{ts escape="sql"}State/Province{/ts}'  ,  8, 'state_province', NULL, 0, NULL,  8, NULL, 0, 0, 1, NULL, NULL),