From 43e00027e7208b9202d11269ce2056a51ede7553 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 28 Aug 2014 17:30:04 +0100 Subject: [PATCH] CRM-15198 - Fix error messages when unable to delete financial type --- CRM/Financial/Form/FinancialType.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CRM/Financial/Form/FinancialType.php b/CRM/Financial/Form/FinancialType.php index 7d75bfefe6..5fc26ef16a 100644 --- a/CRM/Financial/Form/FinancialType.php +++ b/CRM/Financial/Form/FinancialType.php @@ -87,9 +87,7 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form { if ($this->_action & CRM_Core_Action::DELETE) { $errors = CRM_Financial_BAO_FinancialType::del($this->_id); if (!empty($errors)) { - $message = ts('This item cannot be deleted.') . $errors['error_message']; - CRM_Core_Session::setStatus($message); - return CRM_Utils_System::redirect(CRM_Utils_System::url( 'civicrm/admin/financial/financialType', "reset=1&action=browse")); + CRM_Core_Error::statusBounce($errors['error_message'], CRM_Utils_System::url('civicrm/admin/financial/financialType', "reset=1&action=browse"), ts('Cannot Delete')); } CRM_Core_Session::setStatus(ts('Selected financial type has been deleted.')); } -- 2.25.1