util/dataforms.lua
changeset 9092 3a7a0b9f42f3
parent 9091 aa1b02411846
child 9093 56c52cb4d44e
equal deleted inserted replaced
9091:aa1b02411846 9092:3a7a0b9f42f3
    26 end
    26 end
    27 
    27 
    28 function form_t.form(layout, data, formtype)
    28 function form_t.form(layout, data, formtype)
    29 	if not formtype then formtype = "form" end
    29 	if not formtype then formtype = "form" end
    30 	local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype });
    30 	local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype });
       
    31 	if formtype == "cancel" then
       
    32 		return form;
       
    33 	end
    31 	if layout.title then
    34 	if layout.title then
    32 		form:tag("title"):text(layout.title):up();
    35 		form:tag("title"):text(layout.title):up();
    33 	end
    36 	end
    34 	if layout.instructions then
    37 	if layout.instructions then
    35 		form:tag("instructions"):text(layout.instructions):up();
    38 		form:tag("instructions"):text(layout.instructions):up();