From: Tim Otten Date: Wed, 18 Sep 2019 17:55:24 +0000 (-0400) Subject: crmMailing - Only display "Headers and Footers" if there are headers and footers X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=12f3f1818819d8d524f202dcce0c5433a7bbf0e8;p=civicrm-core.git crmMailing - Only display "Headers and Footers" if there are headers and footers --- diff --git a/ang/crmMailing.js b/ang/crmMailing.js index 95148bf27b..6ce813ea61 100644 --- a/ang/crmMailing.js +++ b/ang/crmMailing.js @@ -47,6 +47,9 @@ selectedMail: function($route, crmMailingMgr) { return crmMailingMgr.get($route.current.params.id); }, + mailingFields: function(crmMetadata) { + return crmMetadata.getFields('Mailing'); + }, attachments: function($route, CrmAttachments) { var attachments = new CrmAttachments(function () { return {entity_table: 'civicrm_mailing', entity_id: $route.current.params.id}; diff --git a/ang/crmMailing/EditMailingCtrl.js b/ang/crmMailing/EditMailingCtrl.js index 91f6db3f3a..5651d4f8d6 100644 --- a/ang/crmMailing/EditMailingCtrl.js +++ b/ang/crmMailing/EditMailingCtrl.js @@ -1,12 +1,13 @@ (function(angular, $, _) { - angular.module('crmMailing').controller('EditMailingCtrl', function EditMailingCtrl($scope, selectedMail, $location, crmMailingMgr, crmStatus, attachments, crmMailingPreviewMgr, crmBlocker, CrmAutosaveCtrl, $timeout, crmUiHelp) { + angular.module('crmMailing').controller('EditMailingCtrl', function EditMailingCtrl($scope, selectedMail, $location, crmMailingMgr, crmStatus, attachments, crmMailingPreviewMgr, crmBlocker, CrmAutosaveCtrl, $timeout, crmUiHelp, mailingFields) { var APPROVAL_STATUSES = {'Approved': 1, 'Rejected': 2, 'None': 3}; $scope.mailing = selectedMail; $scope.attachments = attachments; $scope.crmMailingConst = CRM.crmMailing; $scope.checkPerm = CRM.checkPerm; + $scope.mailingFields = mailingFields; var ts = $scope.ts = CRM.ts(null); $scope.hs = crmUiHelp({file: 'CRM/Mailing/MailingUI'}); diff --git a/ang/crmMailing/EditMailingCtrl/2step.html b/ang/crmMailing/EditMailingCtrl/2step.html index cabd6f307c..d5fa639c9b 100644 --- a/ang/crmMailing/EditMailingCtrl/2step.html +++ b/ang/crmMailing/EditMailingCtrl/2step.html @@ -17,7 +17,7 @@
-
+
diff --git a/ang/crmMailing/EditMailingCtrl/workflow.html b/ang/crmMailing/EditMailingCtrl/workflow.html index affa76d84e..9a6c21af2b 100644 --- a/ang/crmMailing/EditMailingCtrl/workflow.html +++ b/ang/crmMailing/EditMailingCtrl/workflow.html @@ -13,7 +13,7 @@
-
+