luci-base: Allow "*" (== Any zone) in the firewall zone selection. master
authorJan Pazdziora <jan.pazdziora@code.adelton.com>
Wed, 29 Jan 2025 18:31:12 +0000 (19:31 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Thu, 30 Jan 2025 16:55:42 +0000 (17:55 +0100)
Signed-off-by: Jan Pazdziora <jan.pazdziora@code.adelton.com>
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js

index 497044d00017d5b1160a7b94490ef1e9d1cce714..171cd4bf9f1f5cbb045611c5f91869861f2a240e 100644 (file)
@@ -149,8 +149,8 @@ var CBIZoneSelect = form.ListValue.extend({
                        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))',
+                               ? ( this.multiple ? 'list(or(uciname,"*"))' : 'or(uciname,"*")' )
+                               : this.multiple ? 'list(or(and(uciname,maxlength(11)),"*"))' : 'or(and(uciname,maxlength(11)),"*")',
                        create: !this.nocreate,
                        create_markup: '' +
                                '<li data-value="{{value}}">' +