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