Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
b2c10f70
Verified
Commit
b2c10f70
authored
Nov 13, 2018
by
Sébastiaan Versteeg
Browse files
Fix JavaScript on pizzas order page
parent
e377ee09
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/pizzas/static/pizzas/js/main.js
View file @
b2c10f70
$
(
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
_t
oken
,
'
X-CSRFToken
'
:
csrf
T
oken
,
'
Accept
'
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
}
...
...
website/pizzas/templates/pizzas/orders.html
View file @
b2c10f70
...
...
@@ -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 %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment