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 crm-mailing-block-recipients=
"{name: 'recipients', id: 'subform.recipients'}" crm-mailing=
"mailing"></div>
55 <div crm-ui-field=
"subform.subject" crm-title=
"ts('Subject')">
56 <div style=
"float: right;">
57 <input crm-mailing-token
crm-for=
"subform.subject" />
60 crm-ui-id=
"subform.subject"
63 ng-model=
"mailing.subject"