*/
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!');
};
-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