From: Miguel Angel Mulero Martinez Date: Tue, 13 Feb 2024 11:25:48 +0000 (+0100) Subject: luci-app-usteer: Fix no wireless defined setup X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4643491b6542660fb6b22bd9f3c9bd5aacfac4cb;p=project%2Fluci.git luci-app-usteer: Fix no wireless defined setup Some users use the usteer app in a "non wireless" device. With the current code it crashes because there is no SSID defined. Making the ui element a DynamicList fixes the issue because it allows free text input. Signed-off-by: Miguel Angel Mulero Martinez (cherry picked from commit ac8cf93a015a3eeb960ef216e59dde643bf059ed) --- diff --git a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js index ce245a4dc7..5cbc8c7a40 100644 --- a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js +++ b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js @@ -609,7 +609,7 @@ return view.extend({ o.optional = true; o.datatype = 'list(string)'; - o = s.taboption('settings', form.MultiValue, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on')); + o = s.taboption('settings', form.DynamicList, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on')); WifiNetworks.forEach(function (wifiNetwork) { if (wifiNetwork.getSSID()) { o.value(wifiNetwork.getSSID())