lots of further updates

This commit is contained in:
Ross
2024-04-10 22:43:57 +01:00
parent 98756baa37
commit bf519a2807
14 changed files with 92 additions and 42 deletions
+1 -1
View File
@@ -71,7 +71,7 @@
<div class="alert alert-info" role="alert">Creating a case in the collection: <a href="{% url 'atlas:collection_detail' pk=form.collection.pk %}">{{form.collection.name}}</a></div>
{% endif %}
<form action="" method="post" enctype="multipart/form-data" id="atlas-form">
<form class="highlight" action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %}
{{ form }}
@@ -33,7 +33,7 @@
{% endif %}
<form action="" method="post" enctype="multipart/form-data" id="atlas-form">
<form class="highlight" action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %}
{{ form }}
+1 -1
View File
@@ -8,7 +8,7 @@
Adding self feedback for {{user_exam.exam}}/{{case}}
</div>
<form action="" method="post">
<form class="highlight" action="" method="post">
{% csrf_token %}
{{ form.non_field_errors }}
+6 -5
View File
@@ -1,12 +1,13 @@
{% extends "atlas/base.html" %}
{% block navigation%}
{{ block.super }}
{% include 'atlas/series_headers.html' %}
{% endblock %}
{% block content %}
<a href="{% url 'atlas:series_update' pk=series.pk %}" title="Edit the Series">Edit</a>
<a href="{% url 'atlas:series_delete' pk=series.pk %}" title="Delete the Series">Delete</a>
{% if request.user.is_superuser %}
<a href="{% url 'admin:atlas_series_change' series.id %}" title="Edit the Series using the admin interface">Admin Edit</a>
{% endif %}
{% include 'atlas/series_viewer.html' %}
{% endblock %}
+37 -28
View File
@@ -6,8 +6,8 @@
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
<script type="text/javascript">
let csrf_token = "{{csrf_token}}";
let hash_url = false;
let csrf_token = "{{csrf_token}}";
let hash_url = false;
document.addEventListener('drop', function (e) { e.preventDefault(); }, false);
$(document).ready(function () {
@@ -332,7 +332,7 @@
}
let select_object = document.getElementsByName("examination")[0]
if (select_object.value == "") {
$.get(`${select_object.dataset.autocompleteLightUrl}?q=${study_description}`, (data) => {
console.log(data)
@@ -341,9 +341,9 @@
$(select_object).select2("trigger","select", {
data: data.results[0]
})
}
})
})
}
@@ -353,31 +353,31 @@
for (let i = 0; i < site_codes.length; i++) {
if (
accession_number.startsWith(site_codes[i])
|| patient_id.startsWith(site_codes[i])) {
not_anon = true;
}
accession_number.startsWith(site_codes[i])
|| patient_id.startsWith(site_codes[i])) {
not_anon = true;
}
}
if (not_anon) {
toastr.warning(`File does not appear to be annonymised<br/>Accession: ${accession_number} <br/>Patient ID: ${patient_id}<br/>`, 'Anonymisation warning', {
"closeButton": false,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-full-width",
"preventDuplicates": false,
"onclick": null,
"showDuration": "0",
"hideDuration": "0",
"timeOut": 0,
"extendedTimeOut": 0,
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut",
});
}
toastr.warning(`File does not appear to be annonymised<br/>Accession: ${accession_number} <br/>Patient ID: ${patient_id}<br/>`, 'Anonymisation warning', {
"closeButton": false,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-full-width",
"preventDuplicates": false,
"onclick": null,
"showDuration": "0",
"hideDuration": "0",
"timeOut": 0,
"extendedTimeOut": 0,
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut",
});
}
// TODO: fix
//$.ajax({
@@ -410,14 +410,23 @@
{{ form.media }}
{% endblock %}
{% block navigation%}
{{ block.super }}
{% if object %}
{% include "atlas/series_headers.html" %}
{% endif %}
{% endblock %}
{% block content %}
<h2>Series Form</h2>
This form will create a image set that can be associated with a atlas question. If the question has already been created
it can be linked below.
<form action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %}
<a href="/generic/examination/create" id="add_examination" class="add-popup"
onclick="return showAddPopup(this);"><img src="{% static '/img/icon-addlink.svg' %}"></a>
onclick="return showAddPopup(this);"><img src="{% static '/img/icon-addlink.svg' %}"></a>
<table>
{{ form.as_table }}
</table>
@@ -0,0 +1,8 @@
<br/>
<a href="{% url 'atlas:series_detail' pk=series.pk %}" title="View the Series">View</a>
<a href="{% url 'atlas:series_update' pk=series.pk %}" title="Edit the Series">Edit</a>
<a href="{% url 'atlas:series_delete' pk=series.pk %}" title="Delete the Series">Delete</a>
<a href="{% url 'atlas:series_authors' pk=series.pk %}" title="Update the authors">Authors</a>
{% if request.user.is_superuser %}
<a href="{% url 'admin:atlas_series_change' series.id %}" title="Edit the Series using the admin interface">Admin Edit</a>
{% endif %}