From: Jan Pazdziora Date: Fri, 10 Jan 2025 22:02:40 +0000 (+0100) Subject: luci-base: addressing this.vstack[0] is undefined. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=abaa26aa57ef799a3b31ad9b5b32d46497fdc0e3;p=project%2Fluci.git luci-base: addressing this.vstack[0] is undefined. Signed-off-by: Jan Pazdziora --- diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js index 99314bca5a..47b31cf0c1 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js @@ -130,7 +130,7 @@ return view.extend({ o.placeholder = _('Unnamed zone'); o.modalonly = true; o.rmempty = false; - o.datatype = L.hasSystemFeature('firewall4') ? '' : 'and(uciname,maxlength(11))'; + o.datatype = L.hasSystemFeature('firewall4') ? 'uciname' : 'and(uciname,maxlength(11))'; o.write = function(section_id, formvalue) { var cfgvalue = this.cfgvalue(section_id); diff --git a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js index 7368d6c523..cd16227fc8 100644 --- a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js +++ b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js @@ -148,7 +148,7 @@ var CBIZoneSelect = form.ListValue.extend({ display_items: this.display_size || this.size || 3, dropdown_items: this.dropdown_size || this.size || 5, validate: L.bind(this.validate, this, section_id), - datatype: L.hasSystemFeature('firewall4') ? '' : 'and(uciname,maxlength(11))', + datatype: L.hasSystemFeature('firewall4') ? 'uciname' : 'and(uciname,maxlength(11))', create: !this.nocreate, create_markup: '' + '
  • ' +