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 <migmul@gmail.com>
This commit is contained in:
Miguel Angel Mulero Martinez 2024-02-13 12:25:48 +01:00 committed by Paul Donald
parent 81f1f9d267
commit ac8cf93a01

View file

@ -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())