protocols: rename type to maptype for map 4374/head
authorRemi NGUYEN VAN <remi.nguyenvan+openwrt@gmail.com>
Sat, 15 Aug 2020 14:22:56 +0000 (23:22 +0900)
committerRemi NGUYEN VAN <remi.nguyenvan+openwrt@gmail.com>
Sat, 15 Aug 2020 14:22:56 +0000 (23:22 +0900)
"type" is already used as a common option for all protocols. This makes
the configuration ambiguous, and Luci sees JS errors when trying to save
a MAP configuration.

Switch to "maptype" instead to avoid the conflict. MAP currently uses
"maptype" and falls back to "type" when not specified.

Signed-off-by: Remi NGUYEN VAN <remi.nguyenvan+openwrt@gmail.com>
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/map.js

index 006ebfbf08951461df2eb3b15b5ebe01c9849480..913d68b9b8e00c2e2fa5d42cf99b371049c9667b 100644 (file)
@@ -40,7 +40,7 @@ return network.registerProtocol('map', {
        renderFormOptions: function(s) {
                var o;
 
-               o = s.taboption('general', form.ListValue, 'type', _('Type'));
+               o = s.taboption('general', form.ListValue, 'maptype', _('Type'));
                o.value('map-e', 'MAP-E');
                o.value('map-t', 'MAP-T');
                o.value('lw4o6', 'LW4over6');