polycule-connect/polyculeconnect/static/scripts/form.js
Melora Hugues 51f9be1486
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
feat #7: allow saving the selected backend choice
2024-08-10 15:16:31 +02:00

11 lines
394 B
JavaScript

let connectorForm = document.getElementById("connectorform");
connectorForm.addEventListener("submit", (e) => {
e.preventDefault();
let connectorName = document.getElementById("cname").value;
let rememberMe = document.getElementById("remember-me").checked;
if (rememberMe === true) {
localStorage.setItem(connectorNameKey, connectorName);
}
chooseConnector(connectorName);
});