Update boolean toggle

- When 2 equals it evaluates null as false and then false is selected.
This commit is contained in:
markjcrane
2025-11-19 15:26:40 -07:00
parent b79ff030da
commit 323d318141
60 changed files with 228 additions and 228 deletions

View File

@@ -1303,8 +1303,8 @@ if ($action == 'update') {
echo " <span class='switch'>\n";
}
echo " <select class='formfld' id='dialplan_enabled' name='dialplan_enabled'>\n";
echo " <option value='true' ".($dialplan_enabled === true ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($dialplan_enabled === false ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " <option value='true' ".($dialplan_enabled == true ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($dialplan_enabled == false ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
if ($input_toggle_style_switch) {
echo " <span class='slider'></span>\n";