X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FRelationshipType.php;h=c03c8fc82fa9ed898381fd20261687295e31225c;hb=ea0677f57b1008657cfe7b3c21822a04c93e3447;hp=02518986d6cc5ce4b14c22f0a2de7e48092f30df;hpb=61ac5f959d775677c6eadffed193fde1d815eac4;p=civicrm-core.git diff --git a/CRM/Admin/Form/RelationshipType.php b/CRM/Admin/Form/RelationshipType.php index 02518986d6..c03c8fc82f 100644 --- a/CRM/Admin/Form/RelationshipType.php +++ b/CRM/Admin/Form/RelationshipType.php @@ -47,9 +47,9 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { */ public function buildQuickForm() { parent::buildQuickForm(); + $this->setPageTitle(ts('Relationship Type')); if ($this->_action & CRM_Core_Action::DELETE) { - return; } @@ -74,7 +74,7 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { CRM_Core_DAO::getAttribute('CRM_Contact_DAO_RelationshipType', 'description') ); - $contactTypes = CRM_Contact_BAO_ContactType::getSelectElements(); + $contactTypes = CRM_Contact_BAO_ContactType::getSelectElements(FALSE, TRUE, '__'); // add select for contact type $contactTypeA = &$this->add('select', 'contact_types_a', ts('Contact Type A') . ' ', @@ -100,6 +100,9 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { } } + /** + * @return array + */ function setDefaultValues() { if ($this->_action != CRM_Core_Action::DELETE && isset($this->_id) @@ -110,12 +113,12 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { $baoName::retrieve($params, $defaults); $defaults['contact_types_a'] = CRM_Utils_Array::value('contact_type_a', $defaults); if (!empty($defaults['contact_sub_type_a'])) { - $defaults['contact_types_a'] .= CRM_Core_DAO::VALUE_SEPARATOR . $defaults['contact_sub_type_a']; + $defaults['contact_types_a'] .= '__' . $defaults['contact_sub_type_a']; } $defaults['contact_types_b'] = $defaults['contact_type_b']; if (!empty($defaults['contact_sub_type_b'])) { - $defaults['contact_types_b'] .= CRM_Core_DAO::VALUE_SEPARATOR . $defaults['contact_sub_type_b']; + $defaults['contact_types_b'] .= '__' . $defaults['contact_sub_type_b']; } return $defaults; } @@ -148,11 +151,11 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { $ids['relationshipType'] = $this->_id; } - $cTypeA = CRM_Utils_System::explode(CRM_Core_DAO::VALUE_SEPARATOR, + $cTypeA = CRM_Utils_System::explode('__', $params['contact_types_a'], 2 ); - $cTypeB = CRM_Utils_System::explode(CRM_Core_DAO::VALUE_SEPARATOR, + $cTypeB = CRM_Utils_System::explode('__', $params['contact_types_b'], 2 ); @@ -168,6 +171,6 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { CRM_Core_Session::setStatus(ts('The Relationship Type has been saved.'), ts('Saved'), 'success'); } } - //end of function + }