From: Tim Otten Date: Tue, 7 Apr 2015 21:28:24 +0000 (-0700) Subject: CRM-16237 - crmMailing - Respect disable_mandatory_tokens_check X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d124a91f772269f68214012ca1b0ea779c366abb;p=civicrm-core.git CRM-16237 - crmMailing - Respect disable_mandatory_tokens_check --- diff --git a/CRM/Mailing/Info.php b/CRM/Mailing/Info.php index 56a9cfe6b4..bad9cd7a85 100644 --- a/CRM/Mailing/Info.php +++ b/CRM/Mailing/Info.php @@ -158,6 +158,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { 'contactid' => $contactID, 'requiredTokens' => CRM_Utils_Token::getRequiredTokens(), 'enableReplyTo' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'replyTo'), + 'disableMandatoryTokensCheck' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'disable_mandatory_tokens_check'), 'fromAddress' => $fromAddress['values'], 'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', array( 'id' => 'user_contact_id', diff --git a/js/angular-crmMailing/services.js b/js/angular-crmMailing/services.js index b9a46965a3..f6ea4f707a 100644 --- a/js/angular-crmMailing/services.js +++ b/js/angular-crmMailing/services.js @@ -185,7 +185,7 @@ // ex: var msgs = findMissingTokens(mailing, 'body_html'); findMissingTokens: function(mailing, field) { var missing = {}; - if (!_.isEmpty(mailing[field])) { + if (!_.isEmpty(mailing[field]) && !CRM.crmMailing.disableMandatoryTokensCheck) { var body = ''; if (mailing.footer_id) { var footer = _.where(CRM.crmMailing.headerfooterList, {id: mailing.footer_id});