}
// add related table elements
- foreach ($rowsElementsAndInfo['rel_table_elements'] as $relTableElement) {
- $element = $this->addElement($relTableElement[0], $relTableElement[1]);
- $element->setChecked(TRUE);
+ foreach (array_keys($rowsElementsAndInfo['rel_tables']) as $relTableElement) {
+ $this->addElement('checkbox', $relTableElement);
+ $this->_defaults[$relTableElement] = 1;
}
$this->assign('rel_tables', $rowsElementsAndInfo['rel_tables']);
CRM_Utils_System::permissionDenied();
}
// ensure that oid is not the current user, if so refuse to do the merge
- if (CRM_Core_Session::singleton()->getLoggedInContactID() == $oid) {
+ if (CRM_Core_Session::getLoggedInContactID() == $oid) {
$message = ts('The contact record which is linked to the currently logged in user account - \'%1\' - cannot be deleted.',
[1 => CRM_Core_Session::singleton()->getLoggedInContactDisplayName()]
);
]);
}
+ /**
+ * Set the defaults for the form.
+ *
+ * @return array
+ * Array of default values
+ */
+ public function setDefaultValues() {
+ return $this->_defaults;
+ }
+
}