Activity form tweaks
authorColeman Watts <coleman@civicrm.org>
Wed, 19 Mar 2014 16:58:43 +0000 (12:58 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 19 Mar 2014 16:58:43 +0000 (12:58 -0400)
CRM/Activity/Form/Activity.php

index 306548db6c4e8877d74164e6e598d3a8cb0acc67..8a4f3dddff26b493f641decc3ee9e4df3105214c 100644 (file)
@@ -178,20 +178,18 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
       'assignee_contact_id' => array(
         'type' => 'entityRef',
         'label' => ts('Assigned To'),
-        'attributes' => array('multiple' => TRUE),
+        'attributes' => array('multiple' => TRUE, 'create' => TRUE),
       ),
       'followup_assignee_contact_id' => array(
         'type' => 'entityRef',
         'label' => ts('Assigned To'),
-        'attributes' => array('multiple' => TRUE),
+        'attributes' => array('multiple' => TRUE, 'create' => TRUE),
       ),
       'followup_activity_type_id' => array(
         'type' => 'select',
         'label' => ts('Followup Activity'),
-        'attributes' => array(
-          '' => '- ' . ts('select activity') . ' -'
-        ) +
-        CRM_Core_PseudoConstant::ActivityType(FALSE)
+        'attributes' => array('' => '- ' . ts('select activity') . ' -') + CRM_Core_PseudoConstant::ActivityType(FALSE),
+        'extra' => array('class' => 'crm-select2'),
       ),
       // Add optional 'Subject' field for the Follow-up Activiity, CRM-4491
       'followup_activity_subject' => array(
@@ -641,7 +639,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
           $this->addEntityRef($field, $values['label'], $attribute, $required);
         }
         else {
-          $this->add($values['type'], $field, $values['label'], $attribute, $required);
+          $this->add($values['type'], $field, $values['label'], $attribute, $required, CRM_Utils_Array::value('extra', $values));
         }
       }
     }