From: Jan Pazdziora Date: Tue, 14 Jan 2025 17:07:33 +0000 (+0100) Subject: luci-base: Enforce maximal firewall zone length in the Create / Assign scenario as... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ff52c0e3586c73fc9880777739f3baf54697f03d;p=project%2Fluci.git luci-base: Enforce maximal firewall zone length in the Create / Assign scenario as well. Signed-off-by: Jan Pazdziora --- 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: '' + '
  • ' +