.
This commit is contained in:
@@ -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('<div class="col-md-6">' +
|
||||||
|
'<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">' +
|
||||||
|
'<div class="col p-4 d-flex flex-column position-static">' +
|
||||||
|
'<h3 class="mb-0">' + json.title + '</h3>' +
|
||||||
|
'<p class="mb-auto">' + json.description + '</p>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>'
|
||||||
|
)
|
||||||
|
},
|
||||||
|
error: function (xhr, errmsg, err) {
|
||||||
|
console.log(xhr.status + ": " + xhr
|
||||||
|
.responseText); // provide a bit more info about the error to the console
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -71,4 +71,9 @@ urlpatterns = [
|
|||||||
views.SeriesUpdate.as_view(),
|
views.SeriesUpdate.as_view(),
|
||||||
name="series_update",
|
name="series_update",
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
"series/add_finding",
|
||||||
|
views.create_series_findings,
|
||||||
|
name="add_finding",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user