From 43ffb3aacbe78fd7ed19217c23438f14acaa27f5 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 29 Jul 2008 14:01:19 +0000 Subject: libs/cbi: Added "Save & Apply" button to CBI forms --- libs/cbi/luasrc/cbi.lua | 3 +++ libs/cbi/luasrc/view/cbi/footer.htm | 1 + 2 files changed, 4 insertions(+) (limited to 'libs') diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 6aec2fbbb..e6952899f 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -154,6 +154,9 @@ end function Map.parse(self, ...) Node.parse(self, ...) uci.save(self.config) + if luci.http.formvalue("cbi.apply") then + uci.commit(self.config) + end uci.unload(self.config) end diff --git a/libs/cbi/luasrc/view/cbi/footer.htm b/libs/cbi/luasrc/view/cbi/footer.htm index 4d21fd168..9ff8de7fd 100644 --- a/libs/cbi/luasrc/view/cbi/footer.htm +++ b/libs/cbi/luasrc/view/cbi/footer.htm @@ -14,6 +14,7 @@ $Id$ -%>
+ -- cgit v1.2.3