CRM-11610 - Search js - Abstract table row highlight/select
[civicrm-core.git] / CRM / Contact / Form / Merge.php
index 18662a2dc54e3444dbb5a343f7324e99c243b03f..f53cddbc7ad21c663526a5c6e24d2e2d4c6b5e1e 100644 (file)
@@ -110,7 +110,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
       $this->assign('mainUfName', $mainUser ? $mainUser->name : NULL);
     }
 
-    $flipUrl = CRM_Utils_system::url('civicrm/contact/merge',
+    $flipUrl = CRM_Utils_System::url('civicrm/contact/merge',
       "reset=1&action=update&cid={$oid}&oid={$cid}&rgid={$rgid}&gid={$gid}"
     );
     if (!$flip) {
@@ -132,7 +132,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
             $urlParam .= "&gid={$gid}";
           }
 
-          $this->$position = CRM_Utils_system::url('civicrm/contact/merge', $urlParam);
+          $this->$position = CRM_Utils_System::url('civicrm/contact/merge', $urlParam);
           $this->assign($position, $this->$position);
         }
       }
@@ -166,7 +166,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
       if ($gid) {
         $urlParam .= "&gid={$gid}";
       }
-      $session->pushUserContext(CRM_Utils_system::url('civicrm/contact/dedupefind', $urlParam));
+      $session->pushUserContext(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlParam));
     }
 
     // ensure that oid is not the current user, if so refuse to do the merge
@@ -213,7 +213,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $this->_oid         = $oid;
     $this->_rgid        = $rgid;
     $this->_contactType = $main['contact_type'];
-    $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('onclick' => "return toggleCheckboxVals('move_',this);"));
+    $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('class' => 'select-rows'));
 
     $this->assign('mainLocBlock', json_encode($rowsElementsAndInfo['main_loc_block']));
     $this->assign('rows', $rowsElementsAndInfo['rows']);
@@ -327,7 +327,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
 
     CRM_Core_Session::setStatus(ts('Contact id %1 has been updated and contact id %2 has been deleted.', array(1 => $this->_cid, 2 => $this->_oid)), ts('Contacts Merged'), 'success');
     $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$this->_cid}");
-    if (CRM_Utils_Array::value('_qf_Merge_submit', $formValues)) {
+    if (!empty($formValues['_qf_Merge_submit'])) {
       $listParamsURL = "reset=1&action=update&rgid={$this->_rgid}";
       if ($this->_gid) {
         $listParamsURL .= "&gid={$this->_gid}";
@@ -337,7 +337,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
       );
       CRM_Utils_System::redirect($lisitingURL);
     }
-     if (CRM_Utils_Array::value('_qf_Merge_done', $formValues)) {
+     if (!empty($formValues['_qf_Merge_done'])) {
       CRM_Utils_System::redirect($url);
     }
 
@@ -365,7 +365,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
           $urlParam .= "&gid={$this->_gid}";
         }
 
-        $url = CRM_Utils_system::url('civicrm/contact/merge', $urlParam);
+        $url = CRM_Utils_System::url('civicrm/contact/merge', $urlParam);
       }
     }