From ff52c0e3586c73fc9880777739f3baf54697f03d Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Tue, 14 Jan 2025 18:07:33 +0100 Subject: [PATCH] luci-base: Enforce maximal firewall zone length in the Create / Assign scenario as well. Signed-off-by: Jan Pazdziora --- .../luci-base/htdocs/luci-static/resources/tools/widgets.js | 3 +++ 1 file changed, 3 insertions(+) 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 0ba07afcde..497044d000 100644 --- a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js +++ b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js @@ -148,6 +148,9 @@ 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') + ? ( this.multiple ? 'list(uciname)' : 'uciname' ) + : this.multiple ? 'list(and(uciname,maxlength(11)))' : 'and(uciname,maxlength(11))', create: !this.nocreate, create_markup: '' + '
  • ' + -- 2.30.2