|
6 | 6 | {% trans "Create an A/B Test" as title %} |
7 | 7 | {% include "wagtailadmin/shared/header.html" with title=title subtitle=page.title icon='people-arrows' merged=1 %} |
8 | 8 |
|
9 | | - <form method="post"> |
10 | | - {% csrf_token %} |
11 | | - |
12 | | - <section class="section"> |
13 | | - <div class="section__title"> |
14 | | - <div class="section__icon-container"> |
15 | | - {% icon "arrow-down" classname="section__icon" %} |
16 | | - </div> |
17 | | - <h3>{% trans "Enter test details" %}</h3> |
18 | | - </div> |
19 | | - |
20 | | - <div class="section__content nice-padding"> |
21 | | - <ul class="fields"> |
22 | | - <li> |
23 | | - {# TODO: Wagtail 6.0 introduced {% formattedfield %} to replace this template include #} |
24 | | - {% include "wagtailadmin/shared/field.html" with field=form.name %} |
25 | | - </li> |
26 | | - <li> |
27 | | - {% include "wagtailadmin/shared/field.html" with field=form.hypothesis %} |
28 | | - </li> |
29 | | - </ul> |
30 | | - </div> |
31 | | - </section> |
32 | | - |
33 | | - |
34 | | - <section class="section"> |
35 | | - <div class="section__title"> |
36 | | - <div class="section__icon-container"> |
37 | | - {% icon "arrow-down" classname="section__icon" %} |
38 | | - </div> |
39 | | - <h3>{% trans "Choose a goal" %}</h3> |
40 | | - </div> |
41 | | - |
42 | | - <div class="section__content nice-padding"> |
43 | | - <div data-component="goal-selector" data-props="{{ goal_selector_props }}"></div> |
44 | | - </div> |
45 | | - </section> |
46 | | - |
47 | | - |
48 | | - <section class="section"> |
49 | | - <div class="section__title"> |
50 | | - <div class="section__icon-container"> |
51 | | - {% icon "arrow-down" classname="section__icon" %} |
52 | | - </div> |
53 | | - <h3>{% trans "Sample size" %}</h3> |
54 | | - </div> |
55 | | - |
56 | | - <div class="section__content nice-padding"> |
57 | | - <ul class="fields"> |
58 | | - <li> |
59 | | - {% include "wagtailadmin/shared/field.html" with field=form.sample_size %} |
60 | | - </li> |
61 | | - </ul> |
62 | | - {% trans 'Need help calculating sample size for A/B tests? Try <a href="https://www.optimizely.com/uk/sample-size-calculator/" target="_blank">Optimisely</a>, <a href="https://www.evanmiller.org/ab-testing/sample-size.html" target="_blank">Evan Miller</a>, or <a href="https://www.abtasty.com/sample-size-calculator/" target="_blank">AB Tasty</a>.' %} |
63 | | - </div> |
64 | | - </section> |
65 | | - |
66 | | - <p class="section__content nice-padding"> |
67 | | - <button type="submit" class="button button-primary">{% trans "Save" %}</button> |
68 | | - <button type="submit" name="start" class="button button-primary">{% trans "Save and start test" %}</button> |
69 | | - </p> |
70 | | - |
71 | | - <div class="nice-padding"> |
72 | | - {% help_block status="info"%} |
73 | | - <p>{% trans "A/B tests are calculated using Pearson's chi squared test and are set at 95% confidence level." %}</p> |
74 | | - <p>{% trans "Traffic is split evenly between each version." %}</p> |
75 | | - <p>{% trans 'Users with "<a href="https://en.wikipedia.org/wiki/Do_Not_Track" target="_blank">Do Not Track</a>" enabled are not counted.' %}</p> |
76 | | - {% endhelp_block %} |
77 | | - </div> |
78 | | - </form> |
| 9 | + <div class="nice-padding"> |
| 10 | + <form method="post"> |
| 11 | + {% csrf_token %} |
| 12 | + |
| 13 | + {% component panel %} |
| 14 | + |
| 15 | + <section class="w-form-width"> |
| 16 | + <p class="section__content"> |
| 17 | + <button type="submit" class="button button-primary">{% trans "Save" %}</button> |
| 18 | + <button type="submit" name="start" class="button button-primary">{% trans "Save and start test" %}</button> |
| 19 | + </p> |
| 20 | + |
| 21 | + {% help_block status="info"%} |
| 22 | + <p>{% trans "A/B tests are calculated using Pearson's chi squared test and are set at 95% confidence level." %}</p> |
| 23 | + <p>{% trans "Traffic is split evenly between each version." %}</p> |
| 24 | + <p>{% trans 'Users with "<a href="https://en.wikipedia.org/wiki/Do_Not_Track" target="_blank">Do Not Track</a>" enabled are not counted.' %}</p> |
| 25 | + {% endhelp_block %} |
| 26 | + </section> |
| 27 | + </form> |
| 28 | + </div> |
79 | 29 | {% endblock %} |
80 | 30 |
|
81 | 31 | {% block extra_js %} |
82 | 32 | {% include "wagtailadmin/pages/_editor_js.html" %} |
| 33 | + {{ goal_selector_props|json_script:"data-goal-selector-props" }} |
83 | 34 | <script> |
84 | 35 | {% url 'wagtailadmin_home' as wagtailadmin_root_url %} |
85 | 36 | wagtailConfig.ADMIN_ROOT_URL = '{{ wagtailadmin_root_url|escapejs }}'; |
|
0 commit comments