Updated error message and suppressed disable link

This commit is contained in:
CiviWare Solutions 2018-07-03 03:00:58 +05:30
parent 0a741c6d9c
commit af76af4420
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ function deleterelationshipperm_civicrm_links($op, $objectName, $objectId, &$lin
if ($op == 'relationship.selector.row' && $objectName == 'Relationship') {
if (!CRM_Core_Permission::check('delete relationships')) {
foreach ($links as $key => $link) {
if ($link['name'] == 'Delete') {
if (in_array($link['name'], ['Delete', 'Disable'])) {
unset($links[$key]);
}
}
@ -194,7 +194,7 @@ function _deleterelationshipperm_civicrm_check_permission($errorType = NULL) {
if (CRM_Core_Permission::check('delete relationships')) {
return FALSE;
}
$message = ts('You do not have the necessary permission to delete this relationship.');
$message = ts('You do not have permission to delete relationships. Please speak to an administrator..');
if ($errorType == 'exception') {
throw new API_Exception($message);
}