CRM-15578 - crmMailing - Start out with an empty mailing
authorTim Otten <totten@civicrm.org>
Thu, 8 Jan 2015 00:36:44 +0000 (16:36 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 8 Jan 2015 00:36:44 +0000 (16:36 -0800)
js/angular-crmMailing/services.js

index 08681ed1100235af4d87d61ab48655dee93d8fd5..f002ed5498bd8c4ce97cf7492bc4869f1486585e 100644 (file)
       create: function create() {
         return {
           jobs: {}, // {jobId: JobRecord}
-          name: "revert this", // fixme
+          name: "",
           campaign_id: null,
           from_name: crmFromAddresses.getDefault().author,
           from_email: crmFromAddresses.getDefault().email,
           replyto_email: "",
-          subject: "For {contact.display_name}", // fixme
-          groups: {include: [2], exclude: [4]}, // fixme
+          subject: "",
+          groups: {include: [], exclude: []},
           mailings: {include: [], exclude: []},
-          body_html: "<b>Hello</b> {contact.display_name}", // fixme
-          body_text: "Hello {contact.display_name}", // fixme
+          body_html: "",
+          body_text: "",
           footer_id: null, // pickDefaultMailComponent('Footer'),
           header_id: null, // pickDefaultMailComponent('Header'),
           visibility: "Public Pages",
         // To get list of recipients, we tentatively save the mailing and
         // get the resulting recipients -- then rollback any changes.
         var params = angular.extend({}, mailing, {
+          name: 'placeholder', // for previewing recipients on new, incomplete mailing
+          subject: 'placeholder', // for previewing recipients on new, incomplete mailing
           options: {force_rollback: 1},
           'api.mailing_job.create': 1, // note: exact match to API default
           'api.MailingRecipients.get': {