@@ -0,0 +1,14 | |||
|
1 | {% extends "base_edit.html" %} | |
|
2 | {% load bootstrap3 %} | |
|
3 | {% load static %} | |
|
4 | {% load main_tags %} | |
|
5 | {% block extra-head %} | |
|
6 | <link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> | |
|
7 | {% endblock %} | |
|
8 | ||
|
9 | {% block extra-js%} | |
|
10 | <script src="{% static 'js/moment.min.js' %}"></script> | |
|
11 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> | |
|
12 | <script src="{% static 'js/cr.js' %}"></script> | |
|
13 | ||
|
14 | {% endblock %} No newline at end of file |
@@ -23,7 +23,7 | |||
|
23 | 23 | {% endif %} |
|
24 | 24 | {% if button %} |
|
25 | 25 | <div class="pull-right"> |
|
26 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button> | |
|
26 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">{% if cancel %}{{cancel}}{% else %}Cancel{% endif %}</button> | |
|
27 | 27 | <button type="submit" class="btn btn-primary">{{button}}</button> |
|
28 | 28 | </div> |
|
29 | 29 | {% endif %} |
@@ -57,6 +57,8 | |||
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | </div> |
|
60 | <br> | |
|
61 | <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_mix">Mix Experiments</button> | |
|
60 | 62 | {% endblock %} |
|
61 | 63 | |
|
62 | 64 | {% block sidebar%} |
@@ -74,5 +76,9 | |||
|
74 | 76 | document.location = "{% url 'url_edit_campaign' campaign.id %}"; |
|
75 | 77 | }); |
|
76 | 78 | |
|
79 | $("#bt_mix").click(function() { | |
|
80 | document.location = "{% url 'url_mix_campaign' campaign.id %}"; | |
|
81 | }); | |
|
82 | ||
|
77 | 83 | </script> |
|
78 | 84 | {% endblock %} No newline at end of file |
@@ -1,48 +1,38 | |||
|
1 | {% extends "base.html" %} | |
|
1 | {% extends "base_edit.html" %} | |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | |
|
6 | {% block conf-active %}active{% endblock %} | |
|
7 | 6 | |
|
8 | {% block content-title %}{{title}}{% endblock %} | |
|
9 | {% block content-suptitle %}{{suptitle}}{% endblock %} | |
|
7 | {% block extra-js%} | |
|
10 | 8 | |
|
11 | {% block content %} | |
|
9 | {% if id_exp %} | |
|
12 | 10 | |
|
13 | {% if form.is_multipart %} | |
|
14 | <form class="form" enctype="multipart/form-data" method="post" action="{{action}}"> | |
|
15 | {% else %} | |
|
16 | <form class="form" method="post" action="{{action}}"> | |
|
17 | {% endif %} | |
|
11 | <script type="text/javascript"> | |
|
18 | 12 | |
|
19 | {% csrf_token %} | |
|
20 | {% bootstrap_form form layout='horizontal' size='medium' %} | |
|
21 | <div style="clear: both;"></div> | |
|
22 | <br> | |
|
23 | {% if extra_button %} | |
|
24 | <div class="pull-left"> | |
|
25 | <button type="button" class="btn btn-primary" id="bt_{{extra_button}}">{{extra_button}}</button> | |
|
26 | </div> | |
|
27 | {% endif %} | |
|
28 | <div class="pull-right"> | |
|
29 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button> | |
|
30 | <button type="submit" class="btn btn-primary">{{button}}</button> | |
|
31 | </div> | |
|
32 | </form> | |
|
33 | {% endblock %} | |
|
13 | $("#id_device").change(function() { | |
|
14 | var url = "{% url 'url_add_dev_conf' id_exp %}"; | |
|
15 | document.location = url+ $(this).val() + "/?name=" + $("#id_name").val(); | |
|
16 | }); | |
|
34 | 17 | |
|
35 | {% block sidebar%} | |
|
36 | {% include "sidebar_devices.html" %} | |
|
37 | {% endblock %} | |
|
18 | $('#id_create_from').change(function() { | |
|
19 | var url = "{% url 'url_add_dev_conf' id_exp %}"; | |
|
20 | if ($(this).val()=="2"){ | |
|
21 | document.location = url+"?template=0"; | |
|
22 | }else if ($(this).val()=="1"){ | |
|
23 | document.location = url+"?blank=0"; | |
|
24 | }else{ | |
|
25 | document.location = url; | |
|
26 | } | |
|
27 | }); | |
|
38 | 28 | |
|
39 | {% block extra-js%} | |
|
40 | {% if id_exp %} | |
|
41 | <script type="text/javascript"> | |
|
42 | $("#id_device").change(function() { | |
|
29 | $('#id_choose_template').change(function() { | |
|
43 | 30 |
var url = "{% url 'url_add_dev_conf' id_exp |
|
44 |
document.location = url+ |
|
|
31 | document.location = url+"?template="+$(this).val(); | |
|
45 | 32 | }); |
|
33 | ||
|
46 | 34 | </script> |
|
35 | ||
|
47 | 36 | {% endif %} |
|
37 | ||
|
48 | 38 | {% endblock %} No newline at end of file |
@@ -30,7 +30,7 | |||
|
30 | 30 | </div> |
|
31 | 31 | <div class="list-group"> |
|
32 | 32 | {% for item in side_configurations %} |
|
33 |
<a href="{{item.get_absolute_url}}" class="list-group-item {%if item.id == dev_conf.id%}active{%endif%}">{{item |
|
|
33 | <a href="{{item.get_absolute_url}}" class="list-group-item {%if item.id == dev_conf.id%}active{%endif%}">{{item}}</a> | |
|
34 | 34 | {% endfor %} |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now