treewide: remove rendundant proto handler options
[project/luci.git] / protocols / luci-proto-hnet / htdocs / luci-static / resources / protocol / hnet.js
1 'use strict';
2 'require form';
3 'require network';
4
5 return network.registerProtocol('hnet', {
6 getI18n: function() {
7 return _('Automatic Homenet (HNCP)');
8 },
9
10 getOpkgPackage: function() {
11 return 'hnet-full';
12 },
13
14 renderFormOptions: function(s) {
15 var dev = this.getL2Device() || this.getDevice(), o;
16
17 o = s.taboption('general', form.ListValue, 'mode', _('Category'));
18 o.value('auto', _('Automatic'));
19 o.value('external', _('External'));
20 o.value('internal', _('Internal'));
21 o.value('leaf', _('Leaf'));
22 o.value('guest', _('Guest'));
23 o.value('adhoc', _('Ad-Hoc'));
24 o.value('hybrid', _('Hybrid'));
25 o.default = 'auto';
26
27 s.taboption('advanced', form.Value, 'link_id', _('IPv6 assignment hint'), _('Assign prefix parts using this hexadecimal subprefix ID for this interface.'));
28
29 o = s.taboption('advanced', form.Value, 'ip4assign', _('IPv4 assignment length'));
30 o.datatype = 'max(32)';
31 o.default = '24';
32
33 o = s.taboption('advanced', form.Value, 'dnsname', _('DNS-Label / FQDN'));
34 o.default = s.section;
35
36 o = s.taboption('advanced', form.Value, 'macaddr', _('Override MAC address'));
37 o.datatype = 'macaddr';
38 o.placeholder = dev ? (dev.getMAC() || '') : '';
39
40 o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
41 o.datatype = 'max(9200)';
42 o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
43 }
44 });