X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fniu%2Fluasrc%2Fmodel%2Fcbi%2Fniu%2Fsystem%2Fgeneral1.lua;h=83481888ceeb286fac13f15beea2be7ceba65ab4;hb=7da7ada00b6e8849e9a64bfe825b25d119879c74;hp=532583828e3d64587df388994f4f11c86dc3fca1;hpb=e8255eab66184ab843012e0523567261a58fea90;p=project%2Fluci.git diff --git a/modules/niu/luasrc/model/cbi/niu/system/general1.lua b/modules/niu/luasrc/model/cbi/niu/system/general1.lua index 532583828..83481888c 100644 --- a/modules/niu/luasrc/model/cbi/niu/system/general1.lua +++ b/modules/niu/luasrc/model/cbi/niu/system/general1.lua @@ -17,22 +17,16 @@ local i18n = require "luci.i18n" local util = require "luci.util" local config = require "luci.config" -m = Map("system", translate("System")) +m = Map("luci", "Device Settings") -s = m:section(TypedSection, "system", "") -s.anonymous = true -s.addremove = false +c = m:section(NamedSection, "main", "core", translate("Local Settings")) -hn = s:option(Value, "hostname", translate("Hostname")) - - - -m2 = Map("luci", translate("Web UI")) - - -c = m2:section(NamedSection, "main", "core") +hn = c:option(Value, "_uniquename", translate("Unique Devicename")) +function hn:cfgvalue(self) + return require "nixio.fs".readfile("/proc/sys/kernel/hostname") +end -l = c:option(ListValue, "lang", translate("Language")) +l = c:option(ListValue, "lang", translate("System Language")) l:value("auto") local i18ndir = i18n.i18ndir .. "default." @@ -42,4 +36,10 @@ for k, v in util.kspairs(config.languages) do l:value(k, v) end end -return m, m2 + +pw1 = c:option(Value, "_pw1", translate("Administrator Password")) +pw1.password = true +pw1.default = "**********" + + +return m