43 lines
1.0 KiB
C++

const char index_html[] = R"rawliteral(
<!DOCTYPE HTML>
<html data-bs-theme="dark">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Password</title>
</head>
<body>
<div class="container mt-5 text-center" style="width: 300px;">
<div class="mb-3">
<label for="ssid" class="form-label">SSID</label>
<input type="text" class="form-control" id="ssid">
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="text" class="form-control" id="password">
</div>
<button class="btn btn-primary" onclick="updateSlider()">Submit</button>
</div>
<script>
function updateSlider() {
let button = document.getElementById("button");
let ssid = document.getElementById("ssid");
let password = document.getElementById("password");
var xhr = new XMLHttpRequest();
xhr.open("GET", "/change?ssid=" + ssid.value + "&password=" + password.value, true);
xhr.send();
}
</script>
</body>
</html>
)rawliteral";