diff --git a/backend/postings/templates/postings/frontend/entity.html b/backend/postings/templates/postings/frontend/entity.html index 1db3136..7b8d11b 100644 --- a/backend/postings/templates/postings/frontend/entity.html +++ b/backend/postings/templates/postings/frontend/entity.html @@ -162,7 +162,7 @@ - {% csrf_token %} +
{% csrf_token %}
diff --git a/frontpage/rateables/js/voting.js b/frontpage/rateables/js/voting.js index fddc9bd..55247aa 100644 --- a/frontpage/rateables/js/voting.js +++ b/frontpage/rateables/js/voting.js @@ -1,20 +1,5 @@ $(function() { - function getCookie(name) { - var cookieValue = null; - if (document.cookie && document.cookie != '') { - var cookies = document.cookie.split(';'); - for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } - } - return cookieValue; - } - var csrftoken = getCookie('csrftoken'); + var csrftoken = $("#csrf-token input").val(); $(".vote-up").click(function() { var reviewId = $(this).attr("data-review-id");