if (this.allowlocal) {
choices[''] = E('span', {
'class': 'zonebadge',
- 'style': 'background-color:' + firewall.getColorForName(null)
+ 'style': firewall.getZoneColorStyle(null)
}, [
E('strong', _('Device')),
(this.allowany || this.allowlocal)
else if (!this.multiple && (this.rmempty || this.optional)) {
choices[''] = E('span', {
'class': 'zonebadge',
- 'style': 'background-color:' + firewall.getColorForName(null)
+ 'style': firewall.getZoneColorStyle(null)
}, E('em', _('unspecified')));
}
if (this.allowany) {
choices['*'] = E('span', {
'class': 'zonebadge',
- 'style': 'background-color:' + firewall.getColorForName(null)
+ 'style': firewall.getZoneColorStyle(null)
}, [
E('strong', _('Any zone')),
(this.allowany && this.allowlocal && !isOutputOnly) ? E('span', ' (%s)'.format(_('forward'))) : ''
choices[name] = E('span', {
'class': 'zonebadge',
- 'style': 'background-color:' + zone.getColor()
+ 'style': firewall.getZoneColorStyle(zone)
}, [ E('strong', name) ].concat(ifaces));
}
return E('label', {
'class': 'zonebadge cbi-tooltip-container',
- 'style': 'background-color:' + zone.getColor()
+ 'style': firewall.getZoneColorStyle(zone)
}, [
E('strong', name),
E('div', { 'class': 'cbi-tooltip' }, ifaces)