Skip to content
Snippets Groups Projects
Unverified Commit 7736f53d authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Update LuCI to master branch

parent 2dd8a700
No related branches found
No related tags found
No related merge requests found
Showing
with 63 additions and 92 deletions
...@@ -15,5 +15,4 @@ PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git ...@@ -15,5 +15,4 @@ PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=d848d49d2443448b147c564c2dd8f64433b5fb9c PACKAGES_ROUTING_COMMIT=d848d49d2443448b147c564c2dd8f64433b5fb9c
PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
PACKAGES_LUCI_COMMIT=70a4d43cc895b7d728b4fc201f2b6fd9f4b8aaec PACKAGES_LUCI_COMMIT=d7328360632d7fbf5fd4006b4172a9fe9861d838
PACKAGES_LUCI_BRANCH=for-15.05
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>"> <form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>">
<div> <div>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<input type="hidden" name="token" value="<%=token%>" />
<input type="hidden" name="cbi.submit" value="1" /> <input type="hidden" name="cbi.submit" value="1" />
</div> </div>
<% end %> <% end %>
......
...@@ -32,11 +32,11 @@ function index() ...@@ -32,11 +32,11 @@ function index()
page.title = _("Wizard") page.title = _("Wizard")
page.target = alias("gluon-config-mode", "wizard") page.target = alias("gluon-config-mode", "wizard")
page.order = 5 page.order = 5
page.setuser = "root" page.sysauth = "root"
page.setgroup = "root" page.sysauth_authenticator = function() return "root" end
page.index = true page.index = true
entry({"gluon-config-mode", "wizard"}, form("gluon-config-mode/wizard")).index = true entry({"gluon-config-mode", "wizard"}, cbi("gluon-config-mode/wizard")).index = true
entry({"gluon-config-mode", "reboot"}, call("action_reboot")) entry({"gluon-config-mode", "reboot"}, call("action_reboot"))
end end
end end
......
<% if not self.embedded then %>
<form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>">
<div>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<input type="hidden" name="cbi.submit" value="1" />
</div>
<% end %>
<div class="cbi-map" id="cbi-<%=self.config%>">
<% if self.title and #self.title > 0 then %><h2><a id="content" name="content"><%=self.title%></a></h2><% end %>
<%- if self.message then %>
<p class="message success"><%=self.message%></p>
<%- end %>
<%- if self.errmessage then %>
<p class="message error"><%=self.errmessage%></p>
<%- end %>
<% if self.description and #self.description > 0 then %><div class="cbi-map-descr"><%=self.description%></div><% end %>
<% self:render_children() %>
</div>
<% if not self.embedded then %>
<div class="cbi-page-actions">
<%-
if type(self.hidden) == "table" then
for k, v in pairs(self.hidden) do
-%>
<input type="hidden" id="<%=k%>" name="<%=k%>" value="<%=pcdata(v)%>" />
<%-
end
end
%>
<% if redirect then %>
<div style="float:left">
<input class="cbi-button cbi-button-link" type="button" value="<%:Back to Overview%>" onclick="location.href='<%=pcdata(redirect)%>'" />
</div>
<% end %>
<%- if self.flow and self.flow.skip then %>
<input class="cbi-button cbi-button-skip" type="submit" name="cbi.skip" value="<%:Skip%>" />
<% end %>
<%- if self.submit ~= false then %>
<input class="cbi-button cbi-button-save" type="submit" name="cbi.apply" value="
<%- if not self.submit then -%><%-:Submit-%><%-else-%><%=self.submit%><%end-%>
" />
<% end %>
<%- if self.reset ~= false then %>
<input class="cbi-button cbi-button-reset" type="reset" value="
<%- if not self.reset then -%><%-:Reset-%><%-else-%><%=self.reset%><%end-%>
" />
<% end %>
<%- if self.cancel ~= false and self.on_cancel then %>
<input class="cbi-button cbi-button-reset" type="submit" name="cbi.cancel" value="
<%- if not self.cancel then -%><%-:Cancel-%><%-else-%><%=self.cancel%><%end-%>
" />
<% end %>
<script type="text/javascript">cbi_d_update();</script>
</div>
</form>
<% end %>
...@@ -48,8 +48,8 @@ $Id$ ...@@ -48,8 +48,8 @@ $Id$
<div class="cbi-page-actions right"> <div class="cbi-page-actions right">
<input type="hidden" name="step" value="2" /> <input type="hidden" name="step" value="2" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Upload image%>" /> <input class="cbi-button cbi-button-apply" type="submit" value="<%:Upload image%>" />
</div> </div>
</form> </form>
<%+footer%> <%+footer%>
...@@ -52,16 +52,17 @@ $Id$ ...@@ -52,16 +52,17 @@ $Id$
</ul> </ul>
</p> </p>
<div class="cbi-page-actions"> <div class="cbi-page-actions">
<form style="display:inline"> <form method="post" action="<%=REQUEST_URI%>" style="display:inline">
<input type="hidden" name="step" value="3" /> <input type="hidden" name="step" value="3" />
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" /> <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Continue%>" /> <input class="cbi-button cbi-button-apply" type="submit" value="<%:Continue%>" />
</form> </form>
<form style="display:inline"> <form method="post" action="<%=REQUEST_URI%>" style="display:inline">
<input type="hidden" name="step" value="1" /> <input type="hidden" name="step" value="1" />
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" /> <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="cbi-button cbi-button-reset" type="submit" value="<%:Cancel%>" /> <input class="cbi-button cbi-button-reset" type="submit" value="<%:Cancel%>" />
</form> </form>
</div> </div>
<%+footer%> <%+footer%>
...@@ -44,6 +44,12 @@ function action_upgrade() ...@@ -44,6 +44,12 @@ function action_upgrade()
-- Determine state -- Determine state
local step = tonumber(luci.http.formvalue("step") or 1) local step = tonumber(luci.http.formvalue("step") or 1)
if step ~= 1 and not luci.dispatcher.test_post_security() then
nixio.fs.unlink(tmpfile)
return
end
local has_image = nixio.fs.access(tmpfile) local has_image = nixio.fs.access(tmpfile)
local has_support = image_supported(tmpfile) local has_support = image_supported(tmpfile)
......
...@@ -18,7 +18,7 @@ local fs = require "nixio.fs" ...@@ -18,7 +18,7 @@ local fs = require "nixio.fs"
local m = Map("system", translate("SSH keys")) local m = Map("system", translate("SSH keys"))
m.pageaction = false m.pageaction = false
m.template = "admin/expertmode" m.template = "cbi/simpleform"
if fs.access("/etc/config/dropbear") then if fs.access("/etc/config/dropbear") then
local s = m:section(TypedSection, "_dummy1", nil, local s = m:section(TypedSection, "_dummy1", nil,
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
local m2 = Map("system", translate("Password")) local m2 = Map("system", translate("Password"))
m2.reset = false m2.reset = false
m2.pageaction = false m2.pageaction = false
m2.template = "admin/expertmode" m2.template = "cbi/simpleform"
local s = m2:section(TypedSection, "_dummy2", nil, translate( local s = m2:section(TypedSection, "_dummy2", nil, translate(
"Alternatively, you can set a password to access you node. Please choose a secure password you don't use anywhere else.<br /><br />" "Alternatively, you can set a password to access you node. Please choose a secure password you don't use anywhere else.<br /><br />"
......
...@@ -14,7 +14,7 @@ $Id$ ...@@ -14,7 +14,7 @@ $Id$
m = Map("autoupdater", translate("Automatic updates")) m = Map("autoupdater", translate("Automatic updates"))
m.pageaction = false m.pageaction = false
m.template = "admin/expertmode" m.template = "cbi/simpleform"
s = m:section(TypedSection, "autoupdater", nil) s = m:section(TypedSection, "autoupdater", nil)
s.addremove = false s.addremove = false
......
...@@ -2,7 +2,6 @@ local uci = luci.model.uci.cursor() ...@@ -2,7 +2,6 @@ local uci = luci.model.uci.cursor()
local util = luci.util local util = luci.util
local f = SimpleForm('mesh_vpn', translate('Mesh VPN')) local f = SimpleForm('mesh_vpn', translate('Mesh VPN'))
f.template = "admin/expertmode"
local s = f:section(SimpleSection) local s = f:section(SimpleSection)
......
...@@ -8,7 +8,6 @@ local config = 'gluon-node-info' ...@@ -8,7 +8,6 @@ local config = 'gluon-node-info'
local role = uci:get(config, uci:get_first(config, "system"), "role") local role = uci:get(config, uci:get_first(config, "system"), "role")
f = SimpleForm("role", i18n.translate("Node role")) f = SimpleForm("role", i18n.translate("Node role"))
f.template = "admin/expertmode"
s = f:section(SimpleSection, nil, i18n.translate( s = f:section(SimpleSection, nil, i18n.translate(
"If this node has a special role within the freifunk network you can specify this role here. " "If this node has a special role within the freifunk network you can specify this role here. "
......
...@@ -21,7 +21,6 @@ local wan6 = uci:get_all("network", "wan6") ...@@ -21,7 +21,6 @@ local wan6 = uci:get_all("network", "wan6")
local dns = uci:get_first("gluon-wan-dnsmasq", "static") local dns = uci:get_first("gluon-wan-dnsmasq", "static")
local f = SimpleForm("portconfig", translate("WAN connection")) local f = SimpleForm("portconfig", translate("WAN connection"))
f.template = "admin/expertmode"
local s local s
local o local o
......
...@@ -8,7 +8,6 @@ local primary_iface = 'wan_radio0' ...@@ -8,7 +8,6 @@ local primary_iface = 'wan_radio0'
local ssid = uci:get('wireless', primary_iface, "ssid") local ssid = uci:get('wireless', primary_iface, "ssid")
f = SimpleForm("wifi", translate("Private WLAN")) f = SimpleForm("wifi", translate("Private WLAN"))
f.template = "admin/expertmode"
s = f:section(SimpleSection, nil, translate( s = f:section(SimpleSection, nil, translate(
'Your node can additionally extend your private network by bridging the WAN interface ' 'Your node can additionally extend your private network by bridging the WAN interface '
......
...@@ -41,7 +41,6 @@ end ...@@ -41,7 +41,6 @@ end
local f = SimpleForm("wifi", translate("WLAN")) local f = SimpleForm("wifi", translate("WLAN"))
f.template = "admin/expertmode"
local s = f:section(SimpleSection, nil, translate( local s = f:section(SimpleSection, nil, translate(
"You can enable or disable your node's client and mesh network " "You can enable or disable your node's client and mesh network "
......
#!/bin/sh /etc/rc.common
if [ -x /etc/init.d/rpcd ]; then
. /etc/init.d/rpcd
fi
...@@ -11,3 +11,5 @@ uci -q batch <<-EOF ...@@ -11,3 +11,5 @@ uci -q batch <<-EOF
set uhttpd.main.max_requests=32 set uhttpd.main.max_requests=32
EOF EOF
/etc/init.d/rpcd disable
...@@ -11,7 +11,7 @@ END__GLUON__CHECK__SITE ...@@ -11,7 +11,7 @@ END__GLUON__CHECK__SITE
endef endef
# Languages supported by LuCi # Languages supported by LuCi
GLUON_SUPPORTED_LANGS := ca zh_cn en fr de el he hu it ja ms no pl pt_br pt ro ru es sv uk vi GLUON_SUPPORTED_LANGS := ca cs de el en es fr he hu it ja ms no pl pt-br pt ro ru sk sv tr uk vi zh-cn zh-tw
GLUON_I18N_PACKAGES := $(foreach lang,$(GLUON_SUPPORTED_LANGS),+LUCI_LANG_$(lang):luci-i18n-base-$(lang)) GLUON_I18N_PACKAGES := $(foreach lang,$(GLUON_SUPPORTED_LANGS),+LUCI_LANG_$(lang):luci-i18n-base-$(lang))
GLUON_I18N_CONFIG := $(foreach lang,$(GLUON_SUPPORTED_LANGS),CONFIG_LUCI_LANG_$(lang)) GLUON_I18N_CONFIG := $(foreach lang,$(GLUON_SUPPORTED_LANGS),CONFIG_LUCI_LANG_$(lang))
......
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 23 Aug 2016 10:58:00 +0200
Subject: build: pass $(STAGING_DIR_HOST) to Host/Install
makes it more consistent with package builds
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Backport of LEDE 4170267f5a794eb3fa6bb1718a665e3395077434
diff --git a/include/host-build.mk b/include/host-build.mk
index 44401b866a4d637648bb093470a5e66b4a3e38fc..82d5361e30e897e18f5c9f9c57334c07bb74c490 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -110,7 +110,7 @@ define Host/Install/Default
endef
define Host/Install
- $(call Host/Install/Default)
+ $(call Host/Install/Default,$(STAGING_DIR_HOST))
endef
@@ -171,7 +171,7 @@ ifndef DUMP
touch $$@
$(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE)
- $(call Host/Install)
+ $(call Host/Install,$(STAGING_DIR_HOST))
$(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep))
mkdir -p $$(shell dirname $$@)
touch $(HOST_STAMP_BUILT)
From: Nils Schneider <nils@nilsschneider.net>
Date: Sat, 9 Aug 2014 09:33:21 +0200
Subject: fvalue.html: add label that can be styled
diff --git a/modules/luci-base/luasrc/view/cbi/fvalue.htm b/modules/luci-base/luasrc/view/cbi/fvalue.htm
index a1e0808e8d3e8bf1845d4838b244ed6bb0b605f2..a324ab258a86b080f9bf285aa62ee4db43468a81 100644
--- a/modules/luci-base/luasrc/view/cbi/fvalue.htm
+++ b/modules/luci-base/luasrc/view/cbi/fvalue.htm
@@ -6,4 +6,5 @@
attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) ..
ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked")
%> />
+ <label<%= attr("for", cbid)%>></label>
<%+cbi/valuefooter%>
...@@ -13,7 +13,7 @@ i.e. duplicated values will be removed. Also, order is not preserved. ...@@ -13,7 +13,7 @@ i.e. duplicated values will be removed. Also, order is not preserved.
Signed-off-by: Nils Schneider <nils@nilsschneider.net> Signed-off-by: Nils Schneider <nils@nilsschneider.net>
diff --git a/modules/luci-base/luasrc/model/uci.lua b/modules/luci-base/luasrc/model/uci.lua diff --git a/modules/luci-base/luasrc/model/uci.lua b/modules/luci-base/luasrc/model/uci.lua
index 1659137742940ea0621e2b57e98232f393dc7efa..d35b9d70e27913c9da302c6975a97888774de535 100644 index 577c6cde08eaa6e10887c97b26fed000f3289070..e77cacec5dfeb447085b13d6275edfe873beb3c4 100644
--- a/modules/luci-base/luasrc/model/uci.lua --- a/modules/luci-base/luasrc/model/uci.lua
+++ b/modules/luci-base/luasrc/model/uci.lua +++ b/modules/luci-base/luasrc/model/uci.lua
@@ -9,7 +9,7 @@ local table = require "table" @@ -9,7 +9,7 @@ local table = require "table"
...@@ -25,7 +25,7 @@ index 1659137742940ea0621e2b57e98232f393dc7efa..d35b9d70e27913c9da302c6975a97888 ...@@ -25,7 +25,7 @@ index 1659137742940ea0621e2b57e98232f393dc7efa..d35b9d70e27913c9da302c6975a97888
local type, tostring, tonumber, unpack = type, tostring, tonumber, unpack local type, tostring, tonumber, unpack = type, tostring, tonumber, unpack
-- The typical workflow for UCI is: Get a cursor instance from the -- The typical workflow for UCI is: Get a cursor instance from the
@@ -147,6 +147,40 @@ function Cursor.set_list(self, config, section, option, value) @@ -150,6 +150,40 @@ function Cursor.set_list(self, config, section, option, value)
return false return false
end end
...@@ -67,10 +67,10 @@ index 1659137742940ea0621e2b57e98232f393dc7efa..d35b9d70e27913c9da302c6975a97888 ...@@ -67,10 +67,10 @@ index 1659137742940ea0621e2b57e98232f393dc7efa..d35b9d70e27913c9da302c6975a97888
function Cursor._affected(self, configlist) function Cursor._affected(self, configlist)
configlist = type(configlist) == "table" and configlist or {configlist} configlist = type(configlist) == "table" and configlist or {configlist}
diff --git a/modules/luci-base/luasrc/model/uci.luadoc b/modules/luci-base/luasrc/model/uci.luadoc diff --git a/modules/luci-base/luasrc/model/uci.luadoc b/modules/luci-base/luasrc/model/uci.luadoc
index 1c208669d17f24d2d1de99bbbf1cefe878649014..281bdb2953ee1888ee41d8d0fb1cc40e9345b3e0 100644 index 49093c7930128f1e6de6f739662b96adcc43fe74..cfec9eea7922da551cb8d2a4f2c540d479b8ccbe 100644
--- a/modules/luci-base/luasrc/model/uci.luadoc --- a/modules/luci-base/luasrc/model/uci.luadoc
+++ b/modules/luci-base/luasrc/model/uci.luadoc +++ b/modules/luci-base/luasrc/model/uci.luadoc
@@ -116,6 +116,30 @@ Set given values as list. @@ -118,6 +118,30 @@ has the same effect as deleting the option.
]] ]]
---[[ ---[[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment