experiment_edit.html
36 lines
| 1.0 KiB
| text/html
|
HtmlDjangoLexer
|
r91 | {% extends "base_edit.html" %} | |
|
r13 | {% load bootstrap3 %} | |
{% load static %} | |||
{% load main_tags %} | |||
{% block extra-head %} | |||
<link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> | |||
{% endblock %} | |||
{% block extra-js%} | |||
|
r45 | <script src="{% static 'js/moment.min.js' %}"></script> | |
|
r13 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> | |
<script type="text/javascript"> | |||
|
r85 | ||
|
r45 | $('.input-group.time').datetimepicker({ | |
format: 'HH:mm:ss', | |||
pickDate: false, | |||
pickSeconds: true | |||
}); | |||
|
r85 | ||
$('#id_create_from').change(function() { | |||
var url = "{% url 'url_add_experiment' %}"; | |||
|
r91 | if ($(this).val()=="2"){ | |
|
r85 | document.location = url+"?template=0"; | |
}else if ($(this).val()=="1"){ | |||
document.location = url+"?blank=0"; | |||
}else{ | |||
document.location = url; | |||
} | |||
}); | |||
$('#id_choose_template').change(function() { | |||
var url = "{% url 'url_add_experiment' %}"; | |||
document.location = url+"?template="+$(this).val(); | |||
}); | |||
|
r13 | </script> | |
{% endblock %} |