- <div crm-ui-field="{name: 'subform.msg_template_id', title: ts('Template')}">
- <div ng-controller="MsgTemplateCtrl">
- <select
- crm-ui-id="subform.msg_template_id"
- name="msg_template_id"
- class="fa-clipboard"
- crm-ui-select="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Message Template')}"
- ng-model="mailing.msg_template_id"
- ng-change="loadTemplate(mailing, mailing.msg_template_id)"
- >
- <option value=""></option>
- <option ng-repeat="frm in crmMsgTemplates.getAll() | orderBy:'msg_title'" ng-value="frm.id">{{frm.msg_title}}</option>
- </select>
- <a crm-icon="fa-floppy-o" ng-if="checkPerm('edit message templates')" ng-click="saveTemplate(mailing)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
- </div>
+ <div crm-ui-field="{name: 'subform.msg_template_id', title: ts('Template')}" ng-if="mailing.template_type=='traditional'">
+ <div crm-mailing-block-templates="{name: 'templates', id: 'subform.msg_template_id'}" crm-mailing="mailing"></div>