From: Tim Otten Date: Mon, 14 Jul 2014 06:17:12 +0000 (-0700) Subject: CRM-14789 - crmCaseType - Pass through more specific error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eb8e4c2d9bf7807315c03bee08202dd0cebc0e7b;p=civicrm-core.git CRM-14789 - crmCaseType - Pass through more specific error --- diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index 131dd62f87..8f579356b1 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -295,7 +295,11 @@ }); }; $scope.deleteCaseType = function (caseType) { - crmApi('CaseType', 'delete', {id: caseType.id}, true) + crmApi('CaseType', 'delete', {id: caseType.id}, { + error: function (data) { + CRM.alert(data.error_message, ts('Error')); + } + }) .then(function (data) { if (!data.is_error) { delete caseTypes.values[caseType.id];