$this->_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $this);
$this->_tableID = $this->_entityId;
$this->_copyValueId = CRM_Utils_Request::retrieve('copyValueId', 'Positive', $this);
- $backUrl = CRM_Core_Session::singleton()->readUserContext();
+
+ $backUrl = 'civicrm/contact/view';
+ $backUrl = CRM_Utils_System::url($backUrl, 'action=browse&selectedChild=custom_' . $this->_groupID, TRUE, NULL, FALSE);
$this->assign('backUrl', $backUrl);
+
if (!empty($_POST['hidden_custom'])) {
$this->assign('postedInfo', TRUE);
}
if (!cj(responseText).find('.crm-error').html()) {
window.location.href = '{/literal}{$backUrl}{literal}';
}
+ else {
+ var errorInfo = cj(responseText).find('div.crm-error').html();
+ cj('.crm-container-snippet #CustomData').prepend(errorInfo);
+ }
}
</script>
{/literal}