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

index 23d3482e9abfe55ad37527bd27d2848315e30346..6d1dc013f195f6e0928589f32e92dc4dd16cfd57 100644 (file)
@@ -13,6 +13,9 @@
     return {
       name: "",
       campaign_id: null,
+      from: _.where(CRM.crmMailing.fromAddress, {is_default: "1"})[0].label,
+      replyto_email: "",
+      subject: "",
       visibility: "Public Pages",
       url_tracking: "1",
       dedupe_email: "1",
index 7b52c8fc9a3aa36461149b4d3647e5116797362d..978fd132c55566165eb74059f77748953779d90b 100644 (file)
@@ -1 +1,58 @@
-mailing.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="fromAddress">{{ts('From')}}</label>
+      </td>
+      <td>
+        <select
+          name="fromAddress"
+          ui-jq="select2"
+          ui-options="{dropdownAutoWidth : true, allowClear: false, placeholder: ts('Email address')}"
+          ng-model="mailing.from"
+          ng-options="frm.label as frm.label for frm in crmMailingConst.fromAddress"
+          required>
+          <option value=""></option>
+        </select>
+      </td>
+    </tr>
+    <tr>
+      <td class="label">
+        <label crm-ui-label crm-for="replyTo">{{ts('Reply-To')}}</label>
+      </td>
+      <td>
+        <select
+          name="replyTo"
+          ui-jq="select2"
+          ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Email address')}"
+          ng-model="mailing.replyto_email"
+          ng-options="frm.label as frm.label for frm in crmMailingConst.fromAddress"
+          >
+          <option value=""></option>
+        </select>
+      </td>
+    </tr>
+    <tr>
+      <td class="label">
+        <label crm-ui-label crm-for="subject">{{ts('Subject')}}</label>
+      </td>
+      <td>
+        <div style="float: right;">
+          <input crm-mailing-token crm-for="subject" />
+        </div>
+        <input
+          type="text"
+          class="crm-form-text"
+          ng-model="mailing.subject"
+          required
+          placeholder="Subject"
+          name="subject" />
+      </td>
+    </tr>
+  </tbody>
+</table>