Commit | Line | Data |
---|---|---|
70980d8e | 1 | <div crm-ui-accordion crm-title="ts('Debug')" crm-collapsed="true"> |
bcdd7f49 TO |
2 | <pre>{{abtest.ab|json}}</pre> |
3 | <pre>{{abtest.mailings|json}}</pre> | |
70980d8e TO |
4 | </div> |
5 | ||
22bc3e48 TO |
6 | <!-- |
7 | An ABTest includes two mailings, but we don't require the user to enter two complete mailings. For | |
8 | simplicity, the email composition UI generally displays A (unless we specifically decided to expose an | |
9 | individual field from B). At the end of the composition process, the controller's "sync" operation will | |
10 | merge shared settings from "A" into "B". | |
11 | --> | |
12 | ||
13 | <form name="crmMailingAB2" novalidate> | |
af6962d8 TO |
14 | <div class="crm-block crm-form-block crmMailing2"> |
15 | <div crm-ui-wizard> | |
22bc3e48 | 16 | <div crm-ui-wizard-step="10" crm-title="ts('Setup')"> |
af6962d8 TO |
17 | <div ng-form="setupForm" crm-ui-id-scope> |
18 | <div> | |
19 | <label crm-ui-for="setupForm.abName">{{ts('What would you like to name the test?')}}</label> | |
20 | </div> | |
21 | <div> | |
22 | <input ng-model="abtest.ab.name" name="abName" crm-ui-id="setupForm.abName" required/> | |
23 | </div> | |
24 | ||
25 | <div> | |
26 | <label>{{ts('What would you like to test?')}}</label> | |
27 | </div> | |
28 | <div ng-repeat="criteria in crmMailingABCriteria.getAll()"> | |
29 | <label> | |
30 | <input name="testing_critiria" ng-model="abtest.ab.testing_criteria_id" type="radio" | |
31 | value="{{criteria.value}}" required/> | |
32 | {{criteria.label}} | |
33 | </label> | |
34 | </div> | |
35 | </div> | |
70980d8e | 36 | </div> |
22bc3e48 TO |
37 | <div crm-ui-wizard-step="20" crm-title="ts('Compose')" ng-if="criteriaName != 'Two different emails'"> |
38 | <div crm-ui-tab-set> | |
39 | <div crm-ui-tab id="tab-mailing" crm-title="ts('Mailing')"> | |
40 | <div | |
41 | ng-if="criteriaName == 'From names'" | |
42 | crm-mailing-ab-block-mailing="{ | |
43 | msg_template_id: 1, | |
44 | fromAddressA: 1, | |
45 | fromAddressB: 1, | |
aafc090b TO |
46 | replyToA: 1, |
47 | replyToB: 1, | |
22bc3e48 TO |
48 | subject: 1 |
49 | }" | |
50 | crm-abtest="abtest"></div> | |
51 | <div | |
52 | ng-if="criteriaName == 'Subject lines'" | |
53 | crm-mailing-ab-block-mailing="{ | |
54 | msg_template_id: 1, | |
55 | fromAddress: 1, | |
56 | replyTo: 1, | |
57 | subjectA: 1, | |
58 | subjectB: 1 | |
59 | }" | |
60 | crm-abtest="abtest"></div> | |
61 | <div crm-ui-accordion crm-title="ts('HTML')"> | |
62 | <div crm-mailing-body-html crm-mailing="abtest.mailings.a"/> | |
63 | </div> | |
64 | <div crm-ui-accordion crm-title="ts('Plain Text')" crm-collapsed='true'> | |
65 | <div crm-mailing-body-text crm-mailing="abtest.mailings.a"/> | |
66 | </div> | |
67 | </div> | |
22bc3e48 | 68 | <div crm-ui-tab id="tab-attachment" crm-title="ts('Attachments')"> |
bcdd7f49 | 69 | <div crm-attachments="abtest.attachments.a"/> |
22bc3e48 | 70 | </div> |
22bc3e48 TO |
71 | <div crm-ui-tab id="tab-header" crm-title="ts('Header and Footer')"> |
72 | <div crm-mailing-block-header-footer crm-mailing="abtest.mailings.a"/> | |
73 | </div> | |
74 | <div crm-ui-tab id="tab-pub" crm-title="ts('Publication')"> | |
75 | <div crm-mailing-block-publication crm-mailing="abtest.mailings.a"/> | |
76 | </div> | |
77 | <div crm-ui-tab id="tab-response" crm-title="ts('Responses')"> | |
78 | <div crm-mailing-block-responses crm-mailing="abtest.mailings.a"/> | |
79 | </div> | |
80 | </div> | |
81 | <div crm-ui-accordion crm-title="ts('Preview (A)')"> | |
82 | <div crm-mailing-block-preview crm-mailing="abtest.mailings.a"/> | |
af6962d8 | 83 | </div> |
22bc3e48 TO |
84 | <div crm-ui-accordion crm-title="ts('Preview (B)')"> |
85 | <div crm-mailing-block-preview crm-mailing="abtest.mailings.b"/> | |
af6962d8 | 86 | </div> |
70980d8e | 87 | </div> |
22bc3e48 TO |
88 | <div crm-ui-wizard-step="30" crm-title="ts('Compose (A)')" ng-if="criteriaName == 'Two different emails'"> |
89 | A | |
90 | </div> | |
91 | <div crm-ui-wizard-step="40" crm-title="ts('Compose (B)')" ng-if="criteriaName == 'Two different emails'"> | |
92 | B | |
93 | </div> | |
94 | <span crm-ui-wizard-buttons style="float:right;"> | |
95 | <button | |
96 | crm-confirm="{title:ts('Delete Draft?'), message:ts('Are you sure you want to delete the draft mailing?')}" | |
97 | on-yes="delete()">{{ts('Delete Draft')}} | |
98 | </button> | |
99 | <button ng-click="save()">{{ts('Save Draft')}}</button> | |
100 | </span> | |
af6962d8 | 101 | </div> |
70980d8e | 102 | </form> |