Files
boxweb/templates/common.html
T

38 lines
1016 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Control Panel</title>
<style>
{% include css %}
</style>
</head>
<body>
<div class="content-container">
{% include svg %}
<div class="control-panel">
<div>
<input type=radio id="readonly", onClick="location.href='?'" checked>view only
<input type=radio id="writable", onClick="location.href='?writable=1'">ACTIVE
</div>
<p> Status messages </p>
<textarea name="outputtext" id="outputtext" rows="10" cols="30" readonly></textarea>
</div>
</div>
</body>
<script>
const urlParams = new URLSearchParams(window.location.search);
var wsaddr = "ws://{{ wsaddr }}";
var writable = urlParams.get('writable');
console.log(writable);
if (writable) {
document.getElementById('readonly').checked = false;
document.getElementById('writable').checked = true;
}
{% include js %}
</script>
</body>
</html>