libs/web: remove inline styles from firewall_zoneforwards and firewall_zonelist widgets
This commit is contained in:
parent
f8d8f10aa8
commit
5d45927643
2 changed files with 15 additions and 15 deletions
|
@ -17,16 +17,16 @@
|
|||
-%>
|
||||
|
||||
<% if zone then %>
|
||||
<div style="padding:0.5em; white-space:nowrap">
|
||||
<label style="background-color:<%=zone:get_color()%>; padding:0.4em">
|
||||
<div style="white-space:nowrap">
|
||||
<label class="zonebadge" style="background-color:<%=zone:get_color()%>">
|
||||
<strong><%=zone:name()%>:</strong>
|
||||
<%
|
||||
<%-
|
||||
local zempty = true
|
||||
for _, net in ipairs(zone:get_networks()) do
|
||||
net = nwm:get_network(net)
|
||||
if net then
|
||||
zempty = false
|
||||
%>
|
||||
-%>
|
||||
<span class="ifacebadge<% if net:name() == self.network then %> ifacebadge-active<% end %>"><%=net:name()%>:
|
||||
<%
|
||||
local nempty = true
|
||||
|
@ -37,20 +37,20 @@
|
|||
<% end %>
|
||||
<% if nempty then %><em><%:(empty)%></em><% end %>
|
||||
</span>
|
||||
<% end end %>
|
||||
<% if zempty then %><em><%:(empty)%></em><% end %>
|
||||
<%- end end -%>
|
||||
<%- if zempty then %><em><%:(empty)%></em><% end -%>
|
||||
</label>
|
||||
 ⇒ 
|
||||
<% for _, fwd in ipairs(zone:get_forwardings_by("src")) do
|
||||
fz = fwd:dest_zone()
|
||||
empty = false %>
|
||||
<label style="background-color:<%=fz:get_color()%>; padding:0.4em">
|
||||
<label class="zonebadge" style="background-color:<%=fz:get_color()%>">
|
||||
<strong><%=fz:name()%></strong>
|
||||
</label> 
|
||||
<% end %>
|
||||
<% if empty then %>
|
||||
<label style="border:1px dashed #AAAAAA; color:#AAAAAA; padding:0.3em">
|
||||
<strong><small><em><%=zone:forward():upper()%></em></small></strong>
|
||||
<label class="zonebadge zonebadge-empty">
|
||||
<strong><%=zone:forward():upper()%></strong>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<% if self.allowlocal then %>
|
||||
<li style="padding:0.5em">
|
||||
<input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "_empty") .. attr("name", cbid) .. attr("value", "") .. ifattr(checked[""], "checked", "checked")%> />  
|
||||
<label<%=attr("for", cbid .. "_empty")%> style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em">
|
||||
<label<%=attr("for", cbid .. "_empty")%> style="background-color:<%=fwm.zone.get_color()%>" class="zonebadge">
|
||||
<strong><%:Device%></strong>
|
||||
<% if self.allowany and self.allowlocal then %>(<%:input%>)<% end %>
|
||||
</label>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<% if self.allowany then %>
|
||||
<li style="padding:0.5em">
|
||||
<input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "_any") .. attr("name", cbid) .. attr("value", "*") .. ifattr(checked["*"], "checked", "checked")%> />  
|
||||
<label<%=attr("for", cbid .. "_any")%> style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em">
|
||||
<label<%=attr("for", cbid .. "_any")%> style="background-color:<%=fwm.zone.get_color()%>" class="zonebadge">
|
||||
<strong><%:Any zone%></strong>
|
||||
<% if self.allowany and self.allowlocal then %>(<%:forward%>)<% end %>
|
||||
</label>
|
||||
|
@ -50,7 +50,7 @@
|
|||
%>
|
||||
<li style="padding:0.5em">
|
||||
<input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "." .. zone:name()) .. attr("name", cbid) .. attr("value", zone:name()) .. ifattr(checked[zone:name()], "checked", "checked")%> />  
|
||||
<label<%=attr("for", cbid .. "." .. zone:name())%> style="background-color:<%=zone:get_color()%>; padding:0.5em">
|
||||
<label<%=attr("for", cbid .. "." .. zone:name())%> style="background-color:<%=zone:get_color()%>" class="zonebadge">
|
||||
<strong><%=zone:name()%>:</strong>
|
||||
<%
|
||||
local zempty = true
|
||||
|
@ -78,9 +78,9 @@
|
|||
<% if self.widget ~= "checkbox" and not self.nocreate then %>
|
||||
<li style="padding:0.5em">
|
||||
<input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%=attr("id", cbid .. "_new") .. attr("name", cbid) .. attr("value", "-") .. ifattr(not selected, "checked", "checked")%> />  
|
||||
<div style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em; display:inline">
|
||||
<label<%=attr("for", cbid .. "_new")%>><em><%:unspecified -or- create:%> </em></label>
|
||||
<input style="width:6em" type="text"<%=attr("name", cbid .. ".newzone") .. ifattr(not selected, "value", luci.http.formvalue(cbid .. ".newzone") or self.default)%> onfocus="document.getElementById('<%=cbid%>_new').checked=true" />
|
||||
<div onclick="document.getElementById('<%=cbid%>_new').checked=true" class="zonebadge" style="background-color:<%=fwm.zone.get_color()%>">
|
||||
<em><%:unspecified -or- create:%> </em>
|
||||
<input type="text"<%=attr("name", cbid .. ".newzone") .. ifattr(not selected, "value", luci.http.formvalue(cbid .. ".newzone") or self.default)%> onfocus="document.getElementById('<%=cbid%>_new').checked=true" />
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue