Merge pull request #17867 from MegaphoneJon/mailing-70
[civicrm-core.git] / CRM / Profile / Form.php
index 1d03a0a68340ee2a173a889c779be098b8d92bf5..8d8f46cd881fd97464027f1e7475434d0a3c5e5a 100644 (file)
@@ -13,7 +13,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
  */
 
 /**
@@ -306,7 +305,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
       if ($this->_multiRecord &&
         !in_array($this->_multiRecord, [CRM_Core_Action::UPDATE, CRM_Core_Action::ADD, CRM_Core_Action::DELETE])
       ) {
-        CRM_Core_Error::fatal(ts('Proper action not specified for this custom value record profile'));
+        CRM_Core_Error::statusBounce(ts('Proper action not specified for this custom value record profile'));
       }
     }
     $this->_duplicateButtonName = $this->getButtonName('upload', 'duplicate');
@@ -322,7 +321,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
 
       // check if we are rendering mixed profiles
       if (CRM_Core_BAO_UFGroup::checkForMixProfiles($this->_profileIds)) {
-        CRM_Core_Error::fatal(ts('You cannot combine profiles of multiple types.'));
+        CRM_Core_Error::statusBounce(ts('You cannot combine profiles of multiple types.'));
       }
 
       // for now consider 1'st profile as primary profile and validate it
@@ -358,7 +357,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
       }
 
       if (empty($this->_ufGroup['is_active'])) {
-        CRM_Core_Error::fatal(ts('The requested profile (gid=%1) is inactive or does not exist.', [
+        CRM_Core_Error::statusBounce(ts('The requested profile (gid=%1) is inactive or does not exist.', [
           1 => $this->_gid,
         ]));
       }
@@ -407,12 +406,12 @@ class CRM_Profile_Form extends CRM_Core_Form {
           if (!$this->_recordId
             && ($this->_multiRecord == CRM_Core_Action::UPDATE || $this->_multiRecord == CRM_Core_Action::DELETE)
           ) {
-            CRM_Core_Error::fatal(ts('The requested Profile (gid=%1) requires record id while performing this action',
+            CRM_Core_Error::statusBounce(ts('The requested Profile (gid=%1) requires record id while performing this action',
               [1 => $this->_gid]
             ));
           }
           elseif (empty($this->_multiRecordFields)) {
-            CRM_Core_Error::fatal(ts('No Multi-Record Fields configured for this profile (gid=%1)',
+            CRM_Core_Error::statusBounce(ts('No Multi-Record Fields configured for this profile (gid=%1)',
               [1 => $this->_gid]
             ));
           }