summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/controllerfunctions.lua6
-rw-r--r--lib/htmlviewfunctions.lua11
2 files changed, 13 insertions, 4 deletions
diff --git a/lib/controllerfunctions.lua b/lib/controllerfunctions.lua
index aba22ed..9c9af31 100644
--- a/lib/controllerfunctions.lua
+++ b/lib/controllerfunctions.lua
@@ -65,12 +65,12 @@ function handle_clientdata(form, clientdata, group)
end
function handle_form(self, getFunction, setFunction, clientdata, option, label, descr)
- local form = getFunction()
+ local form = getFunction(clientdata)
- if clientdata[option] then
+ if clientdata.submit then
handle_clientdata(form, clientdata)
- form = setFunction(form)
+ form = setFunction(form, clientdata.submit)
if not form.errtxt and descr then
form.descr = descr
end
diff --git a/lib/htmlviewfunctions.lua b/lib/htmlviewfunctions.lua
index ef59485..08db605 100644
--- a/lib/htmlviewfunctions.lua
+++ b/lib/htmlviewfunctions.lua
@@ -224,7 +224,16 @@ end
function displayformend(myform)
if not myform then return end
- io.write('<DT></DT><DD><input class="submit" type="submit" name="' .. html.html_escape(myform.option) .. '" value="' .. html.html_escape(myform.submit or myform.option) .. '"></DD>\n')
+ local option = myform.submit or myform.option
+ io.write('<DT></DT><DD>')
+ if type(option) == "table" then
+ for i,v in ipairs(option) do
+ io.write('<input class="submit" type="submit" name="submit" value="' .. html.html_escape(v) .. '">\n')
+ end
+ else
+ io.write('<input class="submit" type="submit" name="submit" value="' .. html.html_escape(myform.submit or myform.option) .. '">\n')
+ end
+ io.write('</DD>\n')
io.write('</FORM>')
io.write('</DL>\n')
end