2 Controller: EditMailingCtrl
3 Required vars: mailing, crmMailingConst
4 Note: Much of this file is duplicated in crmMailing and crmMailingAB with variations on placement/title/binding.
5 It could perhaps be thinned by 30-60% by making more directives.
7 <div class=
"crm-block" ng-form=
"subform" crm-ui-id-scope
>
8 <div class=
"crm-group">
9 <div crm-ui-field=
"subform.msg_template_id" crm-title=
"ts('Template')" style=
"background: #bbf; width:100%; padding: 0.1em;">
10 <div ng-controller=
"MsgTemplateCtrl">
12 crm-ui-id=
"subform.msg_template_id"
13 name=
"msg_template_id"
14 crm-ui-select=
"{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Message Template')}"
15 ng-model=
"mailing.msg_template_id"
16 ng-change=
"loadTemplate(mailing, mailing.msg_template_id)"
18 <option value=
""></option>
19 <option ng-repeat=
"frm in crmMsgTemplates.getAll() | orderBy:'msg_title'" ng-value=
"frm.id">{{frm.msg_title}}
</option>
21 <a ng-click=
"saveTemplate(mailing)" class=
"crm-hover-button action-item" title=
"{{ts('Save As')}}"><span class=
"icon ui-icon-disk"></span></a>
24 <div crm-ui-field=
"subform.fromAddress" crm-title=
"ts('From')">
25 <div ng-controller=
"EmailAddrCtrl" crm-mailing-from-address=
"fromPlaceholder" crm-mailing=
"mailing">
27 crm-ui-id=
"subform.fromAddress"
30 ui-options=
"{dropdownAutoWidth : true, allowClear: false, placeholder: ts('Email address')}"
31 ng-model=
"fromPlaceholder.label"
32 ng-options=
"frm.label as frm.label for frm in crmFromAddresses.getAll() | filter:{is_active:1} | orderBy:'weight'"
34 <option value=
""></option>
38 <div crm-ui-field=
"subform.replyTo" crm-title=
"ts('Reply-To')" ng-show=
"crmMailingConst.enableReplyTo">
39 <div ng-controller=
"EmailAddrCtrl">
41 crm-ui-id=
"subform.replyTo"
44 ui-options=
"{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Email address')}"
45 ng-model=
"mailing.replyto_email"
46 ng-options=
"frm.label as frm.label for frm in crmFromAddresses.getAll() | filter:{is_active:1} | orderBy:'weight'"
48 <option value=
""></option>
52 <div crm-ui-field=
"subform.recipients" crm-title=
"ts('Recipients')">
53 <div ng-controller=
"EditRecipCtrl">
54 <div style=
"float: right;">
55 <div class='crmMailing2-recip-est'
>
56 <a href=
"" ng-click=
"previewRecipients()">{{getRecipientsEstimate()}}
</a>
59 <input name='dedupe_email' type='checkbox' ng-model='mailing.dedupe_email'
ng-true-value=
"1" ng-false-value=
"0" id=
"recipients-dedupe-email" />
60 <label for=
"recipients-dedupe-email">
65 <select crm-mailing-recipients
67 crm-avail-groups=
"crmMailingConst.groupNames | filter:{visibility:'Public pages'}"
68 crm-avail-mailings=
"crmMailingConst.civiMails | filter:{is_completed:1}"
70 crm-ui-id=
"subform.recipients"
76 <div crm-ui-field=
"subform.subject" crm-title=
"ts('Subject')">
77 <div style=
"float: right;">
78 <input crm-mailing-token
crm-for=
"subform.subject" />
81 crm-ui-id=
"subform.subject"
84 ng-model=
"mailing.subject"