libs/cbi: Added "Save & Apply" button to CBI forms
This commit is contained in:
parent
1f3700085c
commit
43ffb3aacb
4 changed files with 6 additions and 0 deletions
|
@ -4,3 +4,4 @@ cbi_invalid = "Error: Invalid input value"
|
||||||
cbi_addopt = "-- Additional Field --"
|
cbi_addopt = "-- Additional Field --"
|
||||||
cbi_optional = " (optional)"
|
cbi_optional = " (optional)"
|
||||||
cbi_sectempty = "This section contains no values yet"
|
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_invalid = "Error: Ungültige Eingabe"
|
||||||
cbi_addopt = "-- Zusätzliches Feld --"
|
cbi_addopt = "-- Zusätzliches Feld --"
|
||||||
cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
|
cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
|
||||||
|
cbi_saveapply = "Speichern & Anwenden"
|
|
@ -154,6 +154,9 @@ end
|
||||||
function Map.parse(self, ...)
|
function Map.parse(self, ...)
|
||||||
Node.parse(self, ...)
|
Node.parse(self, ...)
|
||||||
uci.save(self.config)
|
uci.save(self.config)
|
||||||
|
if luci.http.formvalue("cbi.apply") then
|
||||||
|
uci.commit(self.config)
|
||||||
|
end
|
||||||
uci.unload(self.config)
|
uci.unload(self.config)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ $Id$
|
||||||
-%>
|
-%>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<input type="submit" name="cbi.apply" value="<%:cbi_saveapply%>" />
|
||||||
<input type="submit" value="<%:save%>" />
|
<input type="submit" value="<%:save%>" />
|
||||||
<input type="reset" value="<%:reset%>" />
|
<input type="reset" value="<%:reset%>" />
|
||||||
<script type="text/javascript">cbi_d_init();</script>
|
<script type="text/javascript">cbi_d_init();</script>
|
||||||
|
|
Loading…
Reference in a new issue