campaign_edit.html
53 lines
| 1.5 KiB
| text/html
|
HtmlDjangoLexer
|
r13 | {% extends "base.html" %} | |
{% load bootstrap3 %} | |||
{% load static %} | |||
{% load main_tags %} | |||
{% block extra-head %} | |||
<link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> | |||
{% endblock %} | |||
{% block camp-active %}active{% endblock %} | |||
{% block content-title %}{{title}}{% endblock %} | |||
{% block content-suptitle %}{{suptitle}}{% endblock %} | |||
{% block content %} | |||
<form class="form" method="post" action=""> | |||
{% csrf_token %} | |||
{% bootstrap_form form layout='horizontal' size='medium' %} | |||
<div style="clear: both;"></div> | |||
|
r85 | {% if button %} | |
<br> | |||
<button type="submit" class="btn btn-primary pull-right">{{button}}</button> | |||
{% endif %} | |||
|
r13 | </form> | |
{% endblock %} | |||
{% block sidebar%} | |||
{% include "sidebar_devices.html" %} | |||
{% 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"> | |||
|
r45 | ||
|
r13 | $('.input-group.date').datetimepicker({"format": "YYYY-MM-DD HH:mm"}); | |
|
r85 | $('#id_create_from').change(function() { | |
var url = "{% url 'url_add_campaign' %}"; | |||
if ($(this).val()=="2"){ | |||
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_campaign' %}"; | |||
document.location = url+"?template="+$(this).val(); | |||
}); | |||
|
r13 | </script> | |
{% endblock %} |