diff --git a/app/devices/device_vendor_function_edit.php b/app/devices/device_vendor_function_edit.php index b32817f61a..b3a4f38afe 100644 --- a/app/devices/device_vendor_function_edit.php +++ b/app/devices/device_vendor_function_edit.php @@ -95,7 +95,7 @@ $type = $_POST["type"]; $subtype = $_POST["subtype"]; $value = $_POST["value"]; - $enabled = $_POST["enabled"]; + $enabled = $_POST["enabled"] ?? 'false'; $description = $_POST["description"]; } @@ -366,10 +366,18 @@ echo " ".$text['label-enabled']."\n"; echo "\n"; echo "\n"; - echo " \n"; + if (substr($settings->get('theme', 'input_toggle_style'), 0, 6) == 'switch') { + echo " \n"; + } + else { + echo " \n"; + } echo "
\n"; echo $text['description-enabled']."\n"; echo "\n";