Skip to content

Commit

Permalink
Merge pull request #14927 from seamuslee001/remove_template_field_mos…
Browse files Browse the repository at this point in the history
…aico

Remove template field if using Mosaico in non shoreditch mode
  • Loading branch information
eileenmcnaughton authored Aug 8, 2019
2 parents f07c1d7 + f0327ef commit 8f917a6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion ang/crmMailing/BlockMailing.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<div class="crm-block" ng-form="subform" crm-ui-id-scope>
<div class="crm-group">
<div crm-ui-field="{name: 'subform.msg_template_id', title: ts('Template')}">
<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>
</div>
<div crm-ui-field="{name: 'subform.fromAddress', title: ts('From'), help: hs('from_email')}">
Expand Down
92 changes: 46 additions & 46 deletions ang/crmMailingAB/BlockMailing.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,57 @@
<div class="crm-block" ng-form="subform" crm-ui-id-scope>
<div class="crm-group">


<div crm-ui-field="{name: 'subform.msg_template_id', title: ts('Template')}" ng-if="fields.msg_template_id">
<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="abtest.mailings.a.msg_template_id"
ng-change="loadTemplate(abtest.mailings.a, abtest.mailings.a.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-click="saveTemplate(abtest.mailings.a)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
<div ng-if="abtest.mailings.a.template_type=='traditional'">
<div crm-ui-field="{name: 'subform.msg_template_id', title: ts('Template')}" ng-if="fields.msg_template_id">
<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="abtest.mailings.a.msg_template_id"
ng-change="loadTemplate(abtest.mailings.a, abtest.mailings.a.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-click="saveTemplate(abtest.mailings.a)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
</div>
</div>
</div>
<div crm-ui-field="{name: 'subform.msg_template_idA', title: ts('Template (A)')}" ng-if="fields.msg_template_idA">
<div ng-controller="MsgTemplateCtrl">
<select
crm-ui-id="subform.msg_template_idA"
name="msg_template_idA"
class="fa-clipboard"
crm-ui-select="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Message Template')}"
ng-model="abtest.mailings.a.msg_template_id"
ng-change="loadTemplate(abtest.mailings.a, abtest.mailings.a.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-click="saveTemplate(abtest.mailings.a)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
<div crm-ui-field="{name: 'subform.msg_template_idA', title: ts('Template (A)')}" ng-if="fields.msg_template_idA">
<div ng-controller="MsgTemplateCtrl">
<select
crm-ui-id="subform.msg_template_idA"
name="msg_template_idA"
class="fa-clipboard"
crm-ui-select="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Message Template')}"
ng-model="abtest.mailings.a.msg_template_id"
ng-change="loadTemplate(abtest.mailings.a, abtest.mailings.a.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-click="saveTemplate(abtest.mailings.a)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
</div>
</div>
</div>
<div crm-ui-field="{name: 'subform.msg_template_idB', title: ts('Template (B)')}" ng-if="fields.msg_template_idB">
<div ng-controller="MsgTemplateCtrl">
<select
crm-ui-id="subform.msg_template_idB"
name="msg_template_idB"
class="fa-clipboard"
crm-ui-select="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Message Template')}"
ng-model="abtest.mailings.b.msg_template_id"
ng-change="loadTemplate(abtest.mailings.b, abtest.mailings.b.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-click="saveTemplate(abtest.mailings.b)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
<div crm-ui-field="{name: 'subform.msg_template_idB', title: ts('Template (B)')}" ng-if="fields.msg_template_idB">
<div ng-controller="MsgTemplateCtrl">
<select
crm-ui-id="subform.msg_template_idB"
name="msg_template_idB"
class="fa-clipboard"
crm-ui-select="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Message Template')}"
ng-model="abtest.mailings.b.msg_template_id"
ng-change="loadTemplate(abtest.mailings.b, abtest.mailings.b.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-click="saveTemplate(abtest.mailings.b)" class="crm-hover-button" title="{{ts('Save As')}}"></a>
</div>
</div>
</div>


<div crm-ui-field="{name: 'subform.fromAddress', title: ts('From'), help: hs('from_email')}" ng-if="fields.fromAddress">
<span ng-controller="EmailAddrCtrl" crm-mailing-from-address="fromPlaceholder" crm-mailing="abtest.mailings.a">
<select
Expand Down

0 comments on commit 8f917a6

Please sign in to comment.