clix/adhoc.lua

changeset 124
ff422623e0ba
parent 108
c33848e79bfc
child 125
75902417ff05
equal deleted inserted replaced
123:c61fadb9d4fa 124:ff422623e0ba
52 cmd:next(command_form_layout:form(data, "submit")); 52 cmd:next(command_form_layout:form(data, "submit"));
53 elseif cmd.status == "completed" then 53 elseif cmd.status == "completed" then
54 if cmd.form then 54 if cmd.form then
55 local command_form_layout = dataforms.from_stanza(cmd.form) 55 local command_form_layout = dataforms.from_stanza(cmd.form)
56 local data = command_form_layout:data(cmd.form); 56 local data = command_form_layout:data(cmd.form);
57 if data.title then
58 print("= " .. data.title .. " =");
59 print()
60 end
61 if data.instructions then
62 print(data.instructions);
63 print()
64 end
57 for i, item in ipairs(command_form_layout) do 65 for i, item in ipairs(command_form_layout) do
58 if item.type ~= "hidden" then 66 if item.type ~= "hidden" then
59 print("== " .. item.name .. " ==") 67 print("== " .. item.name .. " ==")
60 print(data[item.name]); 68 print(data[item.name]);
61 end 69 end

mercurial