libs/web: remove inline styles from firewall_zoneforwards and firewall_zonelist widgets
[project/luci.git] / libs / web / luasrc / view / cbi / firewall_zonelist.htm
index 8aa6970..7973437 100644 (file)
@@ -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")%> /> &#160;
-               <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")%> /> &#160;
-               <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")%> /> &#160;
-               <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")%> /> &#160;
-               <div style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em; display:inline">
-                       <label<%=attr("for", cbid .. "_new")%>><em><%:unspecified -or- create:%>&#160;</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:%>&#160;</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 %>