atcheck/lsscanner/new_ubuntu/classcode.html

46 lines
1007 B
HTML
Raw Normal View History

2019-12-16 18:42:21 +01:00
<!DOCTYPE html>
<html>
<head>
2020-03-08 17:10:03 +01:00
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
<meta charset="UTF-8">
2019-12-16 18:42:21 +01:00
2020-03-08 17:10:03 +01:00
<title>Weryfikacja kodu zajęć</title>
2019-12-16 18:42:21 +01:00
</head>
<body>
2020-03-08 17:10:03 +01:00
<div class="container">
2019-12-16 18:42:21 +01:00
<form>
<div>
2020-03-08 17:10:03 +01:00
<p><h4 class="center">Wprowadź kod synchronizujący</h4></p>
2019-12-16 18:42:21 +01:00
<input type="text" id="classcode" required autofocus/>
</div>
<br />
<button class="btn waves-effect waves-light" type="submit">Akceptuj</button>
</form>
2020-03-08 17:10:03 +01:00
</div>
2019-12-16 18:42:21 +01:00
2020-03-08 17:10:03 +01:00
<script>
2019-12-16 18:42:21 +01:00
const electron = require('electron');
const {
2020-03-08 17:10:03 +01:00
ipcRenderer
2019-12-16 18:42:21 +01:00
} = electron;
const form = document.querySelector("form");
form.addEventListener("submit", submitForm);
function submitForm(e) {
2020-03-08 17:10:03 +01:00
e.preventDefault();
2019-12-16 18:42:21 +01:00
2020-03-08 17:10:03 +01:00
var classcode = document.querySelector("#classcode").value;
2019-12-16 18:42:21 +01:00
2020-03-08 17:10:03 +01:00
ipcRenderer.send("set:classcode", classcode);
2019-12-16 18:42:21 +01:00
}
2020-03-08 17:10:03 +01:00
</script>
2019-12-16 18:42:21 +01:00
</body>
</html>