luci-app-firewall: on forward rule change preselection
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 30 Jan 2018 08:45:18 +0000 (09:45 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 1 Mar 2018 11:33:43 +0000 (12:33 +0100)
Change the preselection for the src zone to wan and the dest zon to lan
because this is the normal situation.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm

index e1fef02d98048c66f5337affaebd76845f6ce92f..b06fac3de424f60bae3a7c2a41003a5d6eb2b143 100644 (file)
                                <td class="cbi-section-table-cell" style="width:110px">
                                        <select class="cbi-input-text" id="_newfwd.src" name="_newfwd.src">
                                                <% local k, v; for k, v in ipairs(fw:get_zones()) do -%>
-                                                       <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
+                                                       <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
                                                <%- end %>
                                        </select>
                                </td>
                                <td class="cbi-section-table-cell" style="width:110px">
                                        <select class="cbi-input-text" id="_newfwd.dest" name="_newfwd.dest">
                                                <% local k, v; for k, v in ipairs(fw:get_zones()) do -%>
-                                                       <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
+                                                       <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
                                                <%- end %>
                                        </select>
                                </td>