symposion_app/pinaxcon/templates/symposion/schedule/schedule_edit.html

65 lines
2 KiB
HTML
Raw Normal View History

{% extends "site_base.html" %}
{% load i18n %}
{% block head_title %}Conference Schedule Edit{% endblock %}
{% block page_title %}Conference Schedule Edit{% endblock %}
{% block content %}
<div class="row">
<div class="col-12">
<h2>Schedule Admin</h2>
<form class="form-horizontal" 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>
</div>
</div>
{% for timetable in days %}
<div class="row">
<div class="col-12">
<h2 class="my-4">
{{ timetable.day.date|date:"l" }}, {{ timetable.day.date }}
</h2>
<div class="table-responsive d-none d-md-block">
{% include "symposion/schedule/_grid.html" with edit_schedule=True %}
</div>
<div class="mobile-schedule d-sm-block d-md-none">
{% include "symposion/schedule/_mobile.html" with edit_schedule=True %}
</div>
</div>
</div>
{% endfor %}
<div class="modal fade" id="slotEditModal"></div>
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
$(function() {
$("a.edit-slot").click(function(e) {
$("#slotEditModal").load($(this).data("action"), function() {
$("#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 %}