X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FSearch.php;h=7a0083b2f1209c69cbcea8df672b2b5b475c3de5;hb=ba0d74843bc8d374fea628929a5ceaa408b45956;hp=2cd681aa92d28beea38eddaddc89aa2ae1ba6f5f;hpb=f2a84e5c7c916f6c0d4c7fce69b844b019c17dd1;p=civicrm-core.git diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 2cd681aa92..7a0083b2f1 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -337,7 +337,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { */ function buildQuickForm() { parent::buildQuickForm(); - $this->setAttribute('class', 'crm-search-form crm-ajax-selection-form'); + $this->addClass('crm-ajax-selection-form'); CRM_Core_Resources::singleton() // jsTree is needed for tags popup ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE) @@ -381,10 +381,9 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $url = CRM_Utils_System::makeURL('qfKey') . $formQFKey; CRM_Utils_System::redirect($url); } + $permissionForGroup = FALSE; if (!empty($this->_groupID)) { - $permissionForGroup = FALSE; - // check if user has permission to edit members of this group $permission = CRM_Contact_BAO_Group::checkPermission($this->_groupID); if ($permission && in_array(CRM_Core_Permission::EDIT, $permission)) { @@ -394,13 +393,10 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { // check if _groupID exists, it might not if // we are displaying a hidden group if (!isset($this->_group[$this->_groupID])) { - $permissionForGroup = FALSE; $this->_group[$this->_groupID] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group', $this->_groupID, 'title'); } - $this->assign('permissionedForGroup', $permissionForGroup); - // set the group title $groupValues = array('id' => $this->_groupID, 'title' => $this->_group[$this->_groupID]); $this->assign_by_ref('group', $groupValues); @@ -430,7 +426,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { 'group_contact_status', ts('Group Status') ); - $this->assign('permissionedForGroup', FALSE); + $this->assign('permissionedForGroup', $permissionForGroup); } // add the go button for the action form, note it is of type 'next' rather than of type 'submit' @@ -450,10 +446,14 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $this->assign_by_ref('group', $groupValues); $this->add('submit', $this->_actionButtonName, ts('Add Contacts to %1', array(1 => $this->_group[$this->_amtgID])), array( - 'class' => 'form-submit', + 'class' => 'crm-form-submit', ) ); $this->add('hidden', 'task', CRM_Contact_Task::GROUP_CONTACTS); + $selectedRowsRadio = $this->addElement('radio', 'radio_ts', NULL, '', 'ts_sel', array('checked' => 'checked')); + $allRowsRadio = $this->addElement('radio', 'radio_ts', NULL, '', 'ts_all'); + $this->assign('ts_sel_id', $selectedRowsRadio->_attributes['id']); + $this->assign('ts_all_id', $allRowsRadio->_attributes['id']); } else { $this->addTaskMenu($tasks);