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 |