CRM-15578 - crmMailing2 - Add "summary.html"
authorTim Otten <totten@civicrm.org>
Fri, 31 Oct 2014 01:11:03 +0000 (18:11 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 11 Nov 2014 00:20:51 +0000 (16:20 -0800)
js/angular-crmMailing2.js
partials/crmMailing2/summary.html

index 40ef88a269410f598e3d8a246b04dc27bc5046ea..23d3482e9abfe55ad37527bd27d2848315e30346 100644 (file)
@@ -11,6 +11,8 @@
    */
   var createMailing = function () {
     return {
+      name: "",
+      campaign_id: null,
       visibility: "Public Pages",
       url_tracking: "1",
       dedupe_email: "1",
   });
 
   crmMailing2.controller('EditMailingCtrl', function ($scope, selectedMail) {
+    $scope.mailing = selectedMail;
+    $scope.crmMailingConst = CRM.crmMailing;
+
     $scope.partialUrl = partialUrl;
     $scope.ts = CRM.ts('CiviMail');
+
     $scope.send = function() {
       CRM.alert('Send!');
     };
index 67ba0a4323390a78dffd82e88a03a43b11eab7fd..5dcde6d037238a86d330470d0952f1ec191e5c3d 100644 (file)
@@ -1 +1,39 @@
-summary.html
+<!--
+Controller: EditMailingCtrl
+Required vars: mailing, crmMailingConst
+FIXME: Don't hardcode table-based layout!
+-->
+<table class="form-layout-compressed">
+  <tbody>
+    <tr>
+      <td class="label">
+        <label crm-ui-label crm-for="mailingName">{{ts('Mailing Name')}}</label>
+      </td>
+      <td>
+        <input
+          type="text"
+          class="crm-form-text"
+          ng-model="mailing.name"
+          placeholder="Mailing Name"
+          required
+          name="mailingName" />
+      </td>
+    </tr>
+    <tr ng-show="crmMailingConst.campNames.length > 0">
+      <td class="label">
+        <label crm-ui-label crm-for="campaign">{{ts('Campaign')}}</label>
+      </td>
+      <td>
+        <select
+          name="campaign"
+          ui-jq="select2"
+          ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Select Campaign')}"
+          ng-model="mailing.campaign_id"
+          ng-options="campaign.id as campaign.name for campaign in crmMailingConst.campNames|orderBy:'name'"
+          >
+          <option value=""></option>
+        </select>
+      </td>
+    </tr>
+  </tbody>
+</table>
\ No newline at end of file