button _also_ does sumbit??
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5e6537e92c
commit
55bd482551
|
@ -125,19 +125,16 @@
|
|||
return data;
|
||||
}).then(set_state);
|
||||
}
|
||||
|
||||
function return_handler(e) {
|
||||
e.preventDefault();
|
||||
console.log("wario");
|
||||
let code = document.getElementById("student_number").value;
|
||||
console.log(code);
|
||||
scan_ticket(code);
|
||||
document.getElementById("student_number").value = "";
|
||||
}
|
||||
|
||||
function button_click_handler() {
|
||||
let code = document.getElementById("student_number").value;
|
||||
scan_ticket(code);
|
||||
}
|
||||
document.getElementById("add_student").addEventListener("click", button_click_handler);
|
||||
document.getElementById("student_number_wrapper").addEventListener("submit", return_handler);
|
||||
document.getElementById("start_scan_btn").addEventListener('click', start_scanning);
|
||||
|
||||
|
@ -255,5 +252,10 @@
|
|||
|
||||
document.getElementById("file-selector-button").addEventListener("click", upload_csv);
|
||||
|
||||
|
||||
let elem = document.getElementById("student_number");
|
||||
elem.focus();
|
||||
elem.select();
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue