diff options
author | Dirk Brenken <dev@brenken.org> | 2017-08-05 18:57:20 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2017-08-05 21:49:28 +0200 |
commit | 4e80499a023fb195c7c897841473f526ffd0c7fa (patch) | |
tree | 6fc2145481c50bc16e05456ab2cea62ca2c49a10 /applications/luci-app-travelmate/luasrc/model/cbi | |
parent | b110746b982c68e6e27c693a37862827d65bec9f (diff) |
luci-app-travelmate: bugfix
* fix bug in interface wizard during initial setup
* cosmetics
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc/model/cbi')
7 files changed, 11 insertions, 8 deletions
diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua index 009ed805db..e5a048fa88 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua @@ -12,6 +12,7 @@ end m = SimpleForm("input", nil) m:append(Template("travelmate/config_css")) +m.submit = translate("Save") m.reset = false s = m:section(SimpleSection, nil, diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua index 4d43637d9c..0096d6a8c2 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua @@ -12,6 +12,7 @@ end m = SimpleForm("input", nil) m:append(Template("travelmate/config_css")) +m.submit = translate("Save") m.reset = false s = m:section(SimpleSection, nil, diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua index a025c1379f..7ef9920a08 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua @@ -12,6 +12,7 @@ end m = SimpleForm("input", nil) m:append(Template("travelmate/config_css")) +m.submit = translate("Save") m.reset = false s = m:section(SimpleSection, nil, diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua index 4233da6ac7..8a20ab9cce 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua @@ -14,6 +14,7 @@ end m = SimpleForm("input", nil) m:append(Template("travelmate/config_css")) +m.submit = translate("Save") m.reset = false s = m:section(SimpleSection, nil, diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua index 12cb72cbe5..b16fb4161e 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua @@ -35,20 +35,17 @@ if uplink == "" then o.default = "trm_wwan" o.rmempty = false - function o.write(self, section, value) - iface = o:formvalue(section) - uci:set("travelmate", section, "trm_iface", iface) - uci:save("travelmate") - uci:commit("travelmate") - end - btn = s:option(Button, "", translate("Create Uplink Interface"), translate("Create a new wireless wan uplink interface, configure it to use dhcp and ") .. translate("add it to the wan zone of the firewall. This step has only to be done once.")) btn.inputtitle = translate("Add Interface") btn.inputstyle = "apply" btn.disabled = false - function btn.write() + function btn.write(self, section, value) + iface = o:formvalue(section) + uci:set("travelmate", section, "trm_iface", iface) + uci:save("travelmate") + uci:commit("travelmate") local net = nw:add_network(iface, { proto = "dhcp" }) if net then nw:save("network") diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua index 3f3f2348a7..dcfa17c8b5 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua @@ -7,6 +7,7 @@ local http = require("luci.http") local trmiface = uci.get("travelmate", "global", "trm_iface") or "trm_wwan" m = SimpleForm("add", translate("Add Wireless Uplink Configuration")) +m.submit = translate("Save") m.cancel = translate("Back to overview") m.reset = false diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua index b0a77e4865..6d6bdcff44 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua @@ -6,6 +6,7 @@ local uci = require("luci.model.uci").cursor() local http = require("luci.http") m = SimpleForm("edit", translate("Edit Wireless Uplink Configuration")) +m.submit = translate("Save") m.cancel = translate("Back to overview") m.reset = false |