.
This commit is contained in:
@@ -155,6 +155,26 @@
|
|||||||
ocr(this);
|
ocr(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Hook into the form submission
|
||||||
|
function processForm(e) {
|
||||||
|
if (e.preventDefault) e.preventDefault();
|
||||||
|
|
||||||
|
if (document.getElementById("id_normal").checked){
|
||||||
|
$("#answer_form_set textarea").attr("required", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var form = document.getElementById('rapid-form');
|
||||||
|
if (form.attachEvent) {
|
||||||
|
form.attachEvent("submit", processForm);
|
||||||
|
} else {
|
||||||
|
form.addEventListener("submit", processForm);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
function ocr(input) {
|
function ocr(input) {
|
||||||
// Tesseract.recognize(f, "eng",{ logger: m => console.log(m) }
|
// Tesseract.recognize(f, "eng",{ logger: m => console.log(m) }
|
||||||
|
|||||||
Reference in New Issue
Block a user