mirror of
https://github.com/openwrt/luci.git
synced 2026-01-12 05:00:23 +04:00
libs/cbi: Added "Save & Apply" button to CBI forms
This commit is contained in:
@@ -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_saveapply = "Save & Apply"
|
||||
|
||||
@@ -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_saveapply = "Speichern & Anwenden"
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ $Id$
|
||||
-%>
|
||||
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user