Files
penracourses/templates/cid_selector.html
T
2020-12-27 11:41:40 +00:00

28 lines
745 B
HTML

{% extends 'base.html' %}
{% block content %}
<div class="">
<h2>Score / Results checker</h2>
<p>Please enter your CID</p>
<p>CID: <input type="text" name="cid" id="cid-input"></p>
<button id="cid-selector-go-button">Go...</button>
</div>
<script>
$(document).ready(function () {
$("#cid-input").keypress(function(e) {
// Enter pressed?
console.log(e)
if(e.which == 10 || e.which == 13) {
$("#cid-selector-go-button").click();
}
});
$("#cid-selector-go-button").click(() => {
cid = document.getElementById("cid-input").value;
window.location = window.location + cid;
})
})
</script>
{% endblock %}