luci-base: validate name in firewall zone selector widget

When creating a new zone through the firewall zone selector widget,
validate the given name before creating new items.

Depends on commit 0b6ae96f2 ("luci-base: cbi.js: recognize invalid
input in dropdown create field").

Fixes: #2211
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-10-10 08:30:13 +02:00
parent 0b6ae96f2d
commit cb7f9d2ed3

View file

@ -98,7 +98,7 @@
<span class="zonebadge">
<em><%:create%>:</em>
<input type="password" style="display:none" />
<input class="create-item-input" type="text" />
<input class="create-item-input" type="text" data-type="and(uciname,maxlength(11))" data-optional="true" />
</span>
</li>
<% end %>