diff --git a/anatomy/static/js/anatomy.js b/anatomy/static/js/anatomy.js index 90ea91a0..c3e4b016 100644 --- a/anatomy/static/js/anatomy.js +++ b/anatomy/static/js/anatomy.js @@ -78,6 +78,7 @@ $(document).ready(function () { var jqxhr = $.get(evt.target.dataset.exam_list_url, function (data) { console.log(data); + $("#exam-options").empty(); data.forEach((obj, n) => { $("#exam-options").append($(document.createElement('button')).prop({ type: 'button', @@ -106,6 +107,12 @@ $(document).ready(function () { $("table input:checked").each((n, el) => { ids.push(el.value) }) + + // if no question selected + if (ids.length < 1) { + toastr.info('No question selected.'); + return + } let post_url = document.getElementById("button-select-add-exam").dataset.exam_json_edit_url; let type = document.getElementById("button-select-add-exam").dataset.type; let csrf = document.getElementById("button-select-add-exam").dataset.csrf; diff --git a/rapids/templates/rapids/question_display_block.html b/rapids/templates/rapids/question_display_block.html index 5fa4d593..1ded5b97 100755 --- a/rapids/templates/rapids/question_display_block.html +++ b/rapids/templates/rapids/question_display_block.html @@ -9,10 +9,10 @@

Region: {{ question.get_regions }}

Examination: {{ question.get_examinations }}

Laterality: {{ question.laterality }} - - - - + + + +

Abnormality: {{ question.get_abnormalities }}

Images: @@ -28,6 +28,9 @@ Exams: {% for exam in question.exams.all %} {{ exam.name }}, {% endfor %} + + +

Open Access: {{ question.open_access }}

Feedback: {{ question.feedback }}

@@ -91,6 +94,76 @@