luci-proto-modemmanager: fix when to show username and password
authorFlorian Eckert <[email protected]>
Tue, 27 May 2025 08:05:44 +0000 (10:05 +0200)
committerFlorian Eckert <[email protected]>
Mon, 23 Jun 2025 08:27:17 +0000 (10:27 +0200)
Signed-off-by: Florian Eckert <[email protected]>
protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js

index 6db25631b478c4b047e1211eb1ef86748d12f04a..b7b0b98dba6cd63cc3eeb9250a8b21ceb498b15d 100644 (file)
@@ -125,14 +125,18 @@ return network.registerProtocol('modemmanager', {
                o.depends('allowedmode','5g|4g|3g|2g');
 
                o = s.taboption('general', form.Value, 'username', _('PAP/CHAP username'));
-               o.depends('auth', 'pap');
-               o.depends('auth', 'chap');
-               o.depends('auth', 'both');
+               o.depends({'allowedauth': 'pap', '!contains': true });
+               o.depends({'allowedauth': 'chap', '!contains': true });
+               o.depends({'allowedauth': 'mschap', '!contains': true });
+               o.depends({'allowedauth': 'mschapv2', '!contains': true });
+               o.depends({'allowedauth': 'eap', '!contains': true });
 
                o = s.taboption('general', form.Value, 'password', _('PAP/CHAP password'));
-               o.depends('auth', 'pap');
-               o.depends('auth', 'chap');
-               o.depends('auth', 'both');
+               o.depends({'allowedauth': 'pap', '!contains': true });
+               o.depends({'allowedauth': 'chap', '!contains': true });
+               o.depends({'allowedauth': 'mschap', '!contains': true });
+               o.depends({'allowedauth': 'mschapv2', '!contains': true });
+               o.depends({'allowedauth': 'eap', '!contains': true });
                o.password = true;
 
                o = s.taboption('general', form.ListValue, 'iptype', _('IP Type'));