projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f37000
)
libs/cbi: Added "Save & Apply" button to CBI forms
author
Steven Barth
<steven@midlink.org>
Tue, 29 Jul 2008 14:01:19 +0000
(14:01 +0000)
committer
Steven Barth
<steven@midlink.org>
Tue, 29 Jul 2008 14:01:19 +0000
(14:01 +0000)
i18n/english/luasrc/i18n/cbi.en.lua
patch
|
blob
|
history
i18n/german/luasrc/i18n/cbi.de.lua
patch
|
blob
|
history
libs/cbi/luasrc/cbi.lua
patch
|
blob
|
history
libs/cbi/luasrc/view/cbi/footer.htm
patch
|
blob
|
history
diff --git
a/i18n/english/luasrc/i18n/cbi.en.lua
b/i18n/english/luasrc/i18n/cbi.en.lua
index
1415398
..
4cebd24
100644
(file)
--- a/
i18n/english/luasrc/i18n/cbi.en.lua
+++ b/
i18n/english/luasrc/i18n/cbi.en.lua
@@
-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"
diff --git
a/i18n/german/luasrc/i18n/cbi.de.lua
b/i18n/german/luasrc/i18n/cbi.de.lua
index
f3ed319
..
f0eb7b6
100644
(file)
--- a/
i18n/german/luasrc/i18n/cbi.de.lua
+++ b/
i18n/german/luasrc/i18n/cbi.de.lua
@@
-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
diff --git
a/libs/cbi/luasrc/cbi.lua
b/libs/cbi/luasrc/cbi.lua
index
6aec2fb
..
e695289
100644
(file)
--- 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)
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
diff --git
a/libs/cbi/luasrc/view/cbi/footer.htm
b/libs/cbi/luasrc/view/cbi/footer.htm
index
4d21fd1
..
9ff8de7
100644
(file)
--- a/
libs/cbi/luasrc/view/cbi/footer.htm
+++ b/
libs/cbi/luasrc/view/cbi/footer.htm
@@
-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>