libs/cbi: Added "Save & Apply" button to CBI forms
authorSteven Barth <steven@midlink.org>
Tue, 29 Jul 2008 14:01:19 +0000 (14:01 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 29 Jul 2008 14:01:19 +0000 (14:01 +0000)
i18n/english/luasrc/i18n/cbi.en.lua
i18n/german/luasrc/i18n/cbi.de.lua
libs/cbi/luasrc/cbi.lua
libs/cbi/luasrc/view/cbi/footer.htm

index 1415398..4cebd24 100644 (file)
@@ -4,3 +4,4 @@ cbi_invalid = "Error: Invalid input value"
 cbi_addopt = "-- Additional Field --"
 cbi_optional = " (optional)"
 cbi_sectempty = "This section contains no values yet"
 cbi_addopt = "-- Additional Field --"
 cbi_optional = " (optional)"
 cbi_sectempty = "This section contains no values yet"
+cbi_saveapply = "Save & Apply"
index f3ed319..f0eb7b6 100644 (file)
@@ -3,3 +3,4 @@ cbi_del = "Eintrag entfernen"
 cbi_invalid = "Error: Ungültige Eingabe"
 cbi_addopt = "-- Zusätzliches Feld --"
 cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
 cbi_invalid = "Error: Ungültige Eingabe"
 cbi_addopt = "-- Zusätzliches Feld --"
 cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
+cbi_saveapply = "Speichern & Anwenden"
\ No newline at end of file
index 6aec2fb..e695289 100644 (file)
@@ -154,6 +154,9 @@ end
 function Map.parse(self, ...)
        Node.parse(self, ...)
        uci.save(self.config)
 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
 
        uci.unload(self.config)
 end
 
index 4d21fd1..9ff8de7 100644 (file)
@@ -14,6 +14,7 @@ $Id$
 -%>
 
        <div>
 -%>
 
        <div>
+               <input type="submit" name="cbi.apply" value="<%:cbi_saveapply%>" />
                <input type="submit" value="<%:save%>" />
                <input type="reset" value="<%:reset%>" />
                <script type="text/javascript">cbi_d_init();</script>
                <input type="submit" value="<%:save%>" />
                <input type="reset" value="<%:reset%>" />
                <script type="text/javascript">cbi_d_init();</script>