luci-mod-network: Add length restriction to wireless interface name
Based on issue #6101, add a maxlength of 15 chars to the wireless interface's optional name field. Also validate it as uciname. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
parent
77f2d8895b
commit
0c1be9ae53
1 changed files with 1 additions and 0 deletions
|
@ -1159,6 +1159,7 @@ return view.extend({
|
|||
|
||||
o = ss.taboption('advanced', form.Value, 'ifname', _('Interface name'), _('Override default interface name'));
|
||||
o.optional = true;
|
||||
o.datatype = 'and(uciname,maxlength(15))';
|
||||
o.placeholder = radioNet.getIfname();
|
||||
if (/^radio\d+\.network/.test(o.placeholder))
|
||||
o.placeholder = '';
|
||||
|
|
Loading…
Reference in a new issue