.
This commit is contained in:
@@ -8,7 +8,12 @@
|
||||
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>
|
||||
<p class="pre-whitespace"><b>Laterality:</b> {{ question.laterality }}
|
||||
<button class="toggle-laterality-button toggle-button" data-lat="LEFT">Left</button>
|
||||
<button class="toggle-laterality-button toggle-button" data-lat="RIGHT">Right</button>
|
||||
<button class="toggle-laterality-button toggle-button" data-lat="BILAT">Bilateral</button>
|
||||
<button class="toggle-laterality-button toggle-button" data-lat="NONE">None</button>
|
||||
</p>
|
||||
<p class="pre-whitespace"><b>Abnormality:</b> {{ question.get_abnormalities }}</p>
|
||||
<div class="pre-whitespace multi-image-block"><b>Images:</b>
|
||||
{% for image in question.images.all %}
|
||||
@@ -106,14 +111,37 @@
|
||||
})
|
||||
.done(function (data) {
|
||||
console.log(data);
|
||||
toastr.info('Answer saved')
|
||||
toastr.info('Answer updated')
|
||||
})
|
||||
.fail(function () {
|
||||
alert('Error updating this model instance.');
|
||||
//chk_status_field.prop('checked', !chk_status_field.prop('checked'));
|
||||
});
|
||||
});
|
||||
|
||||
$(".toggle-laterality-button").each((n, el) => {
|
||||
$(el).click(function () {
|
||||
$.ajax({
|
||||
url: "{% url 'rapid-detail' question.id %}",
|
||||
type: 'PATCH',
|
||||
headers: {
|
||||
"X-CSRFToken": "{{ csrf_token }}"
|
||||
},
|
||||
timeout: 3000,
|
||||
data: {
|
||||
csrfmiddlewaretoken: "{{ csrf_token }}",
|
||||
laterality: el.dataset.lat,
|
||||
}
|
||||
})
|
||||
.done(function (data) {
|
||||
console.log(data);
|
||||
toastr.info('Answer updated')
|
||||
})
|
||||
.fail(function () {
|
||||
alert('Error updating this model instance.');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(".suggested_answers li").each((n, el) => {
|
||||
$(el).append($("<span class='correct'>[Add Correct]</span>").on("click", function () {
|
||||
$.ajax({
|
||||
|
||||
Reference in New Issue
Block a user