From ebe432825025a581dbff0e49a117d38ebdc1f8d5 Mon Sep 17 00:00:00 2001 From: Neuroquila-n8fall Date: Fri, 7 Oct 2022 14:21:19 +0200 Subject: [PATCH 1/2] Fix forms submit eventlistener --- data/frontend/auxsensors.html | 4 ++-- data/frontend/canbus.html | 2 +- data/frontend/firmware.html | 2 +- data/frontend/general.html | 2 +- data/frontend/leds.html | 2 +- data/frontend/mqtt.html | 4 ++-- data/frontend/wifi.html | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/frontend/auxsensors.html b/data/frontend/auxsensors.html index 9807079..a07405c 100644 --- a/data/frontend/auxsensors.html +++ b/data/frontend/auxsensors.html @@ -90,8 +90,8 @@

Configured Sensors

loadSensors(true); addSensorAddressInputs(); - _("add-sensor-form").addEventListener("onsubmit", addSensor); - _("aux-form").addEventListener("onsubmit", saveSensors); + _("add-sensor-form").addEventListener('submit', addSensor); + _("aux-form").addEventListener('submit', saveSensors); function Sensor() { this.Label = ""; diff --git a/data/frontend/canbus.html b/data/frontend/canbus.html index 7fecaae..cd161c2 100644 --- a/data/frontend/canbus.html +++ b/data/frontend/canbus.html @@ -193,7 +193,7 @@
Mixed Circuit
loadNavigation(); loadCanAddresses(); - _("canbus-form").addEventListener("onsubmit", saveCanbusData); + _("canbus-form").addEventListener('submit', saveCanbusData); async function loadCanAddresses() { const form = document.forms["canbus-form"]; diff --git a/data/frontend/firmware.html b/data/frontend/firmware.html index bea3285..1444a40 100644 --- a/data/frontend/firmware.html +++ b/data/frontend/firmware.html @@ -65,6 +65,6 @@

Update Firmware & Filesystem

\ No newline at end of file diff --git a/data/frontend/general.html b/data/frontend/general.html index 4630d50..c9d8b66 100644 --- a/data/frontend/general.html +++ b/data/frontend/general.html @@ -93,7 +93,7 @@

General Settings

getTz(); loadGeneralConfig(); - _("general-form").addEventListener("onsubmit", sendGeneralConfig); + _("general-form").addEventListener('submit', sendGeneralConfig); async function loadGeneralConfig() { let form = document.forms["general-form"]; diff --git a/data/frontend/leds.html b/data/frontend/leds.html index f3d80bb..fe9d89e 100644 --- a/data/frontend/leds.html +++ b/data/frontend/leds.html @@ -96,7 +96,7 @@

LED Configuration

loadNavigation(); loadConfig(); - _("led-form").addEventListener("onsubmit", saveConfig); + _("led-form").addEventListener('submit', saveConfig); async function loadConfig() { const form = document.forms["led-form"]; diff --git a/data/frontend/mqtt.html b/data/frontend/mqtt.html index 01ba1f1..10957a6 100644 --- a/data/frontend/mqtt.html +++ b/data/frontend/mqtt.html @@ -194,8 +194,8 @@

Topics Configuration

loadMqttConfig(); loadMqttTopicsConfig(); - _("mqtt-form").addEventListener("onsubmit", sendMqttConfig); - _("mqtt-topics-form").addEventListener("onsubmit", sendMqttTopicsConfig); + _("mqtt-form").addEventListener('submit', sendMqttConfig); + _("mqtt-topics-form").addEventListener('submit', sendMqttTopicsConfig); async function loadMqttConfig() { const form = document.forms["mqtt-form"]; diff --git a/data/frontend/wifi.html b/data/frontend/wifi.html index df9eeaf..2a6669b 100644 --- a/data/frontend/wifi.html +++ b/data/frontend/wifi.html @@ -88,7 +88,7 @@

Found Networks