47 lines
995 B
HTML
47 lines
995 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<!-- 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">
|
||
|
|
||
|
<title>Add classes</title>
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div class="container">
|
||
|
<form>
|
||
|
<div>
|
||
|
<h5 class="center">Enter class data</h3>
|
||
|
<br /> Kod zajęć:
|
||
|
<input type="text" id="classcode" required autofocus/>
|
||
|
</div>
|
||
|
<br />
|
||
|
<button class="btn waves-effect waves-light" type="submit">Akceptuj</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
const electron = require('electron');
|
||
|
const {
|
||
|
ipcRenderer
|
||
|
} = electron;
|
||
|
|
||
|
const form = document.querySelector("form");
|
||
|
form.addEventListener("submit", submitForm);
|
||
|
|
||
|
function submitForm(e) {
|
||
|
e.preventDefault();
|
||
|
|
||
|
var classcode = document.querySelector("#classcode").value;
|
||
|
|
||
|
ipcRenderer.send("set:classcode", classcode);
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|