luci-base: tools.widgets: adjust zone selector dropdown markup
authorJo-Philipp Wich <jo@mein.io>
Mon, 8 Nov 2021 19:44:59 +0000 (20:44 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 10 Nov 2021 10:57:43 +0000 (11:57 +0100)
No functional changes but required for styling rules.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js

index 35a4dc8ec9dcc5b8f897d782d0236a108ce5ca96..00ec1a889c06a882daee832c0e4d32f67f895e7f 100644 (file)
@@ -66,7 +66,7 @@ var CBIZoneSelect = form.ListValue.extend({
                        }, [
                                E('strong', _('Device')),
                                (this.allowany || this.allowlocal)
-                                       ? ' (%s)'.format(this.option != 'dest' ? _('output') : _('input')) : ''
+                                       ? E('span', ' (%s)'.format(this.option != 'dest' ? _('output') : _('input'))) : ''
                        ]);
                }
                else if (!this.multiple && (this.rmempty || this.optional)) {
@@ -82,7 +82,7 @@ var CBIZoneSelect = form.ListValue.extend({
                                'style': 'background-color:' + firewall.getColorForName(null)
                        }, [
                                E('strong', _('Any zone')),
-                               (this.allowany && this.allowlocal && !isOutputOnly) ? ' (%s)'.format(_('forward')) : ''
+                               (this.allowany && this.allowlocal && !isOutputOnly) ? E('span', ' (%s)'.format(_('forward'))) : ''
                        ]);
                }
 
@@ -188,11 +188,11 @@ var CBIZoneSelect = form.ListValue.extend({
                                        }
 
                                        L.dom.content(emptyval.querySelector('span'), [
-                                               E('strong', _('Device')), ' (%s)'.format(_('input'))
+                                               E('strong', _('Device')), E('span', ' (%s)'.format(_('input')))
                                        ]);
 
                                        L.dom.content(anyval.querySelector('span'), [
-                                               E('strong', _('Any zone')), ' (%s)'.format(_('forward'))
+                                               E('strong', _('Any zone')), E('span', ' (%s)'.format(_('forward')))
                                        ]);
 
                                        anyval.parentNode.insertBefore(emptyval, anyval);