From 523da9861f4e753b092d0fd9aaf7b82940a03e68 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Fri, 10 Jan 2025 23:02:40 +0100 Subject: [PATCH] luci-base: addressing this.vstack[0] is undefined. Signed-off-by: Jan Pazdziora --- .../htdocs/luci-static/resources/view/firewall/zones.js | 2 +- modules/luci-base/htdocs/luci-static/resources/tools/widgets.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 99314bca5a10..47b31cf0c19b 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 7368d6c523cd..cd16227fc829 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: '' + '
  • ' +