From: Coleman Watts Date: Fri, 2 May 2014 22:29:54 +0000 (-0700) Subject: code cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=202df40813cbbd563605e0f48d96eaf33cb29b7a;p=civicrm-core.git code cleanup --- diff --git a/CRM/Contribute/Form/Contribution/OnBehalfOf.php b/CRM/Contribute/Form/Contribution/OnBehalfOf.php index 7140aada4b..38bd4653e6 100644 --- a/CRM/Contribute/Form/Contribution/OnBehalfOf.php +++ b/CRM/Contribute/Form/Contribution/OnBehalfOf.php @@ -130,13 +130,11 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf { if ($contactID && count($form->_employers) >= 1) { $form->add('text', 'organization_id', ts('Select an existing related Organization OR enter a new one')); - $employers = array(); - foreach ($form->_employers as $id => $vals) { - $employers[$id] = $vals['name']; - } - $form->add('select', 'onbehalfof_id', 'onbehalfof_id', $employers); - $orgOptions = array(0 => ts('Select an existing organization'), + $form->add('select', 'onbehalfof_id', '', CRM_Utils_Array::collect('name', $form->_employers)); + + $orgOptions = array( + 0 => ts('Select an existing organization'), 1 => ts('Enter a new organization'), );