.
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
</div>
|
||||
|
||||
<p class="pre-whitespace"><b>Rapid:</b> {{ question }}</p>
|
||||
<p class="pre-whitespace"><b>Normal:</b> {{ question.normal }} <button id="toggle-normal-button">toggle</button></p>
|
||||
<p class="pre-whitespace"><b>Normal:</b> {{ question.normal }} <button id="toggle-normal-button"
|
||||
class="toggle-button">toggle</button></p>
|
||||
<p class="pre-whitespace"><b>Region:</b> {{ question.get_regions }}</p>
|
||||
<p class="pre-whitespace"><b>Examination:</b> {{ question.get_examinations }}</p>
|
||||
<p class="pre-whitespace"><b>Laterality:</b> {{ question.laterality }}</p>
|
||||
@@ -94,13 +95,20 @@
|
||||
$.ajax({
|
||||
url: "{% url 'rapid-detail' question.id %}",
|
||||
type: 'PATCH',
|
||||
headers:{"X-CSRFToken": "{{ csrf_token }}"},
|
||||
headers: {
|
||||
"X-CSRFToken": "{{ csrf_token }}"
|
||||
},
|
||||
timeout: 3000,
|
||||
data: {
|
||||
csrfmiddlewaretoken: "{{ csrf_token }}",
|
||||
normal: n,
|
||||
}
|
||||
})
|
||||
.done(function (data) {
|
||||
console.log(data);
|
||||
toastr.info('Answer saved')
|
||||
}
|
||||
})
|
||||
.fail(function () {
|
||||
alert('Error updating this model instance.');
|
||||
//chk_status_field.prop('checked', !chk_status_field.prop('checked'));
|
||||
@@ -207,3 +215,13 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.toggle-button {
|
||||
font-size: x-small;
|
||||
opacity: 10%;
|
||||
}
|
||||
.toggle-button:hover {
|
||||
font-size: x-small;
|
||||
opacity: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user