.
This commit is contained in:
@@ -85,14 +85,20 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
var $crf_token = $('[name="csrfmiddlewaretoken"]').attr('value');
|
||||
/* beautify ignore:start */
|
||||
n = {{ question.normal | lower }}
|
||||
/* beautify ignore:end */
|
||||
|
||||
$("#toggle-normal-button").click(function () {
|
||||
$.ajax({
|
||||
url: "{% url 'rapid-detail' question.id %}",
|
||||
type: 'PATCH',
|
||||
headers:{"X-CSRFToken": $crf_token},
|
||||
timeout: 3000,
|
||||
data: {
|
||||
csrfmiddlewaretoken: "{{ csrf_token }}",
|
||||
normal: {{ question.normal | lower }},
|
||||
normal: n,
|
||||
}
|
||||
})
|
||||
.fail(function () {
|
||||
|
||||
Reference in New Issue
Block a user