comparison mod_adhoc/adhoc/adhoc.lib.lua @ 207:1ae653712e37

mod_adhoc: Add capability to pass data to forms mod_adhoc_cmd_modules: Update to use afforementioned functionality
author Florian Zeitz <florob@babelmonkeys.de>
date Sat, 10 Jul 2010 01:26:41 +0200
parents b3a68e71b8a1
children 67f03b7786af
comparison
equal deleted inserted replaced
206:d3498f115fcd 207:1ae653712e37
67 '" at node "'..command.node..'" provided an invalid action "'..action..'"'); 67 '" at node "'..command.node..'" provided an invalid action "'..action..'"');
68 end 68 end
69 end 69 end
70 cmdtag:add_child(actions); 70 cmdtag:add_child(actions);
71 elseif name == "form" then 71 elseif name == "form" then
72 cmdtag:add_child(content:form()); 72 cmdtag:add_child((content.layout or content):form(content.data));
73 elseif name == "result" then 73 elseif name == "result" then
74 cmdtag:add_child(content.layout:form(content.data, "result")); 74 cmdtag:add_child((content.layout or content):form(content.data, "result"));
75 elseif name == "other" then 75 elseif name == "other" then
76 cmdtag:add_child(content); 76 cmdtag:add_child(content);
77 end 77 end
78 end 78 end
79 stanza:add_child(cmdtag); 79 stanza:add_child(cmdtag);