diff --git a/atlas/templates/atlas/series_viewer.html b/atlas/templates/atlas/series_viewer.html index d55bbaba..26da05e7 100755 --- a/atlas/templates/atlas/series_viewer.html +++ b/atlas/templates/atlas/series_viewer.html @@ -57,4 +57,35 @@ This series is not associated with any cases. }); }); + + $(document).on('submit', '#series_finding_form', function (e) { + $.ajax({ + type: 'POST', + url: '{% url "series:add_finding" %}', + data: { + description: $('#description').val(), + series: $('#finding-form select[name="series"]').find(":selected").val(), + annotation_json: cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState(), + findings: $('#finding-form select[name="findings"]').find(":selected").val(), + csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(), + action: 'post' + }, + success: function (json) { + document.getElementById("post-form").reset(); + $(".posts").prepend('
' + json.description + '
' + + '