symposion_app/symposion/templates/schedule/schedule_edit.html
2014-02-28 10:55:54 -05:00

65 lines
2 KiB
HTML

{% extends "site_base.html" %}
{% load i18n %}
{% load bootstrap_tags %}
{% block head_title %}Conference Schedule Edit{% endblock %}
{% block body_class %}full{% endblock %}
{% block right %}
{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="{{ STATIC_URL }}chosen/chosen.css" />
{% endblock %}
{% block body_outer %}
<div class="row">
<div class="span12">
<h1>Schedule Edit</h1>
{% for timetable in days %}
<h2>{{ timetable.day.date }}</h2>
{% include "schedule/_edit_grid.html" %}
{% endfor %}
</div>
{% if request.user.is_staff %}
<form id="schedule-builder" action="." method="post" enctype="multipart/form-data">{% csrf_token %}
{{ form.as_p }}
<input type="submit" name="submit" value="Submit" />
<input type="submit" id="delete" name="delete" value="Delete Schedule" />
</form>
{% endif %}
<div class="modal fade hide in" id="slotEditModal"></div>
</div>
{% endblock %}
{% block extra_script %}
<script src="{{ STATIC_URL }}chosen/chosen.jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("a.edit-slot").click(function(e) {
$("#slotEditModal").load($(this).data("action"), function() {
$("#id_presentation").chosen();
$("#slotEditModal").modal("show");
});
e.preventDefault();
});
});
$(function() {
//submit event handler
$("form#schedule-builder :submit").click(function(e) {
var name = this.name;
if(name == 'delete') {
if (!confirm("Are you sure you want to delete the schedule?"))
{
e.preventDefault();
return;
}
}
});
});
</script>
{% endblock %}