Verified Commit b2c10f70 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix JavaScript on pizzas order page

parent e377ee09
$(function() {
var csrfToken = $('#pizzas-orders').data('csrf');
$('table').tablesort();
$('thead th.paid-title, thead th.collected-title').data('sortBy', function (th, td, tablesort) {
......@@ -18,7 +19,7 @@ $(function() {
type: 'PATCH',
data: JSON.stringify({paid: !paid}),
headers : {
'X-CSRFToken': csrf_token,
'X-CSRFToken': csrfToken,
'Accept': 'application/json',
'Content-Type': 'application/json'
}
......
......@@ -7,7 +7,7 @@
{{ block.super }}{% endblock %}
{% block body %}
<section class="page-section" id="pizzas-orders">
<section class="page-section" id="pizzas-orders" data-csrf="{{ csrf_token }}">
<div class="container">
<h1 class="text-center section-title">
{% blocktrans trimmed with title=event.title %}
......@@ -106,9 +106,5 @@
src="{% static "pizzas/js/jquery.tablesort.min.js" %}"></script>
<script type="text/javascript"
src="{% static "pizzas/js/main.js" %}"></script>
<script type="text/javascript">
var csrf_token = '{{ csrf_token }}';
</script>
{% endcompress %}
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment