.
This commit is contained in:
@@ -5,6 +5,9 @@
|
|||||||
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
let normal = false;
|
||||||
|
|
||||||
function showEditPopup(url) {
|
function showEditPopup(url) {
|
||||||
var win = window.open(url, "Edit",
|
var win = window.open(url, "Edit",
|
||||||
'height=500,width=800,resizable=yes,scrollbars=yes');
|
'height=500,width=800,resizable=yes,scrollbars=yes');
|
||||||
@@ -39,12 +42,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function input_change(evt) {
|
function input_change(evt) {
|
||||||
$(this).removeClass("image-ident-warning");
|
$(evt.target).removeClass("image-ident-warning");
|
||||||
$(this).removeClass("image-ident-ok");
|
$(evt.target).removeClass("image-ident-ok");
|
||||||
updateFileList();
|
updateFileList();
|
||||||
console.log("input change1", evt);
|
console.log("input change1", evt);
|
||||||
console.log("input change", this);
|
console.log("input change", evt.target);
|
||||||
ocr(this);
|
ocr(evt.target);
|
||||||
|
|
||||||
// Check if we have selected a examination type
|
// Check if we have selected a examination type
|
||||||
console.log($("#id_examination_from").val())
|
console.log($("#id_examination_from").val())
|
||||||
@@ -172,8 +175,10 @@
|
|||||||
function ifNormal() {
|
function ifNormal() {
|
||||||
if (document.getElementById("id_normal").checked) {
|
if (document.getElementById("id_normal").checked) {
|
||||||
$("#answer_form_set textarea").attr("required", false)
|
$("#answer_form_set textarea").attr("required", false)
|
||||||
|
normal = true;
|
||||||
} else {
|
} else {
|
||||||
$("#answer_form_set textarea").attr("required", true)
|
$("#answer_form_set textarea").attr("required", true)
|
||||||
|
normal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,6 +186,15 @@
|
|||||||
|
|
||||||
ifNormal();
|
ifNormal();
|
||||||
|
|
||||||
|
$("#rapid-form").on("submit", (evt) => {
|
||||||
|
if (!normal) {
|
||||||
|
if ($('#id_answers-TOTAL_FORMS').val() == "0") {
|
||||||
|
add_answers_input_form();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user