5 var m = new L.cbi.Map('wireless', {
6 caption: L.tr('Wireless configuration')
9 var s = m.section(L.cbi.TypedSection, 'wifi-device', {
10 caption: L.tr('WiFi devices'),
14 (s.option(L.cbi.DummyValue, '__name', {
15 caption: L.tr('Device')
16 })).ucivalue = function(sid)
21 s.option(L.cbi.CheckboxValue, 'disabled', {
22 caption: L.tr('Disabled')
25 s.option(L.cbi.InputValue, 'channel', {
26 caption: L.tr('Channel')
29 var s_1 = s.subsection(L.cbi.TypedSection, 'wifi-iface', {
30 caption: L.tr('Device interfaces'),
32 add_caption: L.tr('Add interface …')
35 s_1.filter = function(section, parent_sid) {
36 return section.device == parent_sid;
39 s_1.add = function(name, sid) {
40 var iface = this.ownerMap.add('wireless', 'wifi-iface');
41 this.ownerMap.set('wireless', iface, 'device', sid);
46 caption: L.tr('General Settings')
49 s_1.taboption('general', L.cbi.CheckboxValue, 'disabled', {
50 caption: L.tr('Disabled')
53 s_1.taboption('general', L.cbi.ListValue, 'mode', {
54 caption: L.tr('Mode'),
57 .value('ap', L.tr('Access Point'))
58 .value('sta', L.tr('Client'))
59 .value('adhoc', L.tr('Ad-Hoc'))
60 .value('wds', L.tr('WDS (Wireless Distribution System)'))
61 .value('monitor', L.tr('Monitor'))
62 .value('mesh', L.tr('Mesh'));
64 s_1.taboption('general', L.cbi.InputValue, 'ssid', {
70 caption: L.tr('Security')
73 s_1.taboption('security', L.cbi.ListValue, 'encryption', {
74 caption: L.tr('Encryption'),
77 .value('none', L.tr('No encryption'))
78 .value('psk', L.tr('WPA Personal (PSK)'))
79 .value('psk2', L.tr('WPA2 Personal (PSK)'))
80 .value('mixed-psk', L.tr('WPA/WPA2 Personal (PSK) mixed'));
82 s_1.taboption('security', L.cbi.PasswordValue, 'key', {
83 caption: L.tr('Passphrase'),
87 return m.insertInto('#map');