From fa756d1fbbb1af713bb75541eebdf0df127db4f6 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 9 Feb 2018 15:12:21 +0100 Subject: [PATCH 1/5] luci-base: fix browser.htm template If cbi_init() is not called first browser gif will not be found. Signed-off-by: Florian Eckert --- modules/luci-base/luasrc/view/cbi/browser.htm | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/luci-base/luasrc/view/cbi/browser.htm b/modules/luci-base/luasrc/view/cbi/browser.htm index a18120141d..2abc975e8d 100644 --- a/modules/luci-base/luasrc/view/cbi/browser.htm +++ b/modules/luci-base/luasrc/view/cbi/browser.htm @@ -2,6 +2,7 @@ <%+cbi/valueheader%> /> <%+cbi/valuefooter%> From 846fb1f8bc7e779d22d399fa4ac4cb9f73964007 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Feb 2018 13:07:24 +0100 Subject: [PATCH 2/5] luci-app-firewall: only show portforward template if there are more then one zone Only show portforward template if there are more then one zone. Signed-off-by: Florian Eckert --- .../luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm index 58121c4203..e1fef02d98 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm @@ -2,6 +2,7 @@ local fw = require "luci.model.firewall".init() local wz = fw:get_zone("wan") local lz = fw:get_zone("lan") + local zones = fw:get_zones() %>
@@ -38,7 +39,7 @@ <% end %> - <% if wz and lz then %> + <% if #zones > 1 then %> From a5b970d5f2cb57e71fa0012e07146a4782d798bb Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 30 Jan 2018 09:45:18 +0100 Subject: [PATCH 3/5] luci-app-firewall: on forward rule change preselection 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 --- .../luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm index e1fef02d98..b06fac3de4 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm @@ -57,14 +57,14 @@ From 7bb2cd621370de9af6540cb0cfb0034905c5a737 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 30 Jan 2018 11:52:32 +0100 Subject: [PATCH 4/5] luci-app-firewall: only show SNAT template if there are more then one zone Only show SNAT template if there are more then one zone. Signed-off-by: Florian Eckert --- .../luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm index ce275111d8..0a5913fc00 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm @@ -1,8 +1,7 @@ <% local fw = require "luci.model.firewall".init() local nw = require "luci.model.network".init() - local wz = fw:get_zone("wan") - local lz = fw:get_zone("lan") + local zones = fw:get_zones() local keys, vals, a, k, v = {}, {} for k, v in ipairs(nw:get_interfaces()) do @@ -14,7 +13,7 @@ %>
- <% if wz and lz then %> + <% if #zones > 1 then %>

<%:New forward rule%>:
From 10fbf9b2e45c8b723c4c5d58a9183a55715f3d04 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 24 Jan 2018 14:57:08 +0100 Subject: [PATCH 5/5] luci-mod-admin-full: add hint on backup restore Add a hint to backup restore that files could remain on the system. Signed-off-by: Florian Eckert --- .../luci-mod-admin-full/luasrc/view/admin_system/flashops.htm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm index 3e3f65d919..b32ef78263 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm @@ -54,6 +54,9 @@ + <% if reset_avail then %> +
<%:Custom files (certificates, scripts) may remain on the system. To prevent this, perform a factory-reset first.%>
+ <% end %>